Skip to content

Commit ab99e23

Browse files
sudeep-hollaJassiBrar
authored andcommitted
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 <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 471de2c commit ab99e23

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/mailbox/arm_mhu.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id)
113113
struct device *dev = &adev->dev;
114114
int mhu_reg[MHU_CHANS] = {MHU_LP_OFFSET, MHU_HP_OFFSET, MHU_SEC_OFFSET};
115115

116+
if (!of_device_is_compatible(dev->of_node, "arm,mhu"))
117+
return -ENODEV;
118+
116119
/* Allocate memory for device */
117120
mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL);
118121
if (!mhu)

0 commit comments

Comments
 (0)