mailbox: arm_mhu: Match only if compatible is "arm,mhu"

Since we will be soon adding a separate driver based on this ARM MHU
driver to support doorbell mode, let us add explicit check to match
the default compatible for this driver. This is needed as the probe
and match reuses the AMBA device ids currently and don't have any
explicit compatible check.

Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>

authored by Sudeep Holla and committed by Jassi Brar ab99e237 471de2c0

+3
+3
drivers/mailbox/arm_mhu.c
··· 113 struct device *dev = &adev->dev; 114 int mhu_reg[MHU_CHANS] = {MHU_LP_OFFSET, MHU_HP_OFFSET, MHU_SEC_OFFSET}; 115 116 /* Allocate memory for device */ 117 mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL); 118 if (!mhu)
··· 113 struct device *dev = &adev->dev; 114 int mhu_reg[MHU_CHANS] = {MHU_LP_OFFSET, MHU_HP_OFFSET, MHU_SEC_OFFSET}; 115 116 + if (!of_device_is_compatible(dev->of_node, "arm,mhu")) 117 + return -ENODEV; 118 + 119 /* Allocate memory for device */ 120 mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL); 121 if (!mhu)