Skip to content

Commit

Permalink
mailbox: arm_mhu: Match only if compatible is "arm,mhu"
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
sudeep-holla authored and JassiBrar committed Oct 13, 2020
1 parent 471de2c commit ab99e23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/mailbox/arm_mhu.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id)
struct device *dev = &adev->dev;
int mhu_reg[MHU_CHANS] = {MHU_LP_OFFSET, MHU_HP_OFFSET, MHU_SEC_OFFSET};

if (!of_device_is_compatible(dev->of_node, "arm,mhu"))
return -ENODEV;

/* Allocate memory for device */
mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL);
if (!mhu)
Expand Down

0 comments on commit ab99e23

Please sign in to comment.