mailbox: arm_mhu: Match only if compatible is "arm,mhu"
[linux-2.6-microblaze.git] / drivers / mailbox / arm_mhu.c
index 9da2365..b7fbf27 100644 (file)
@@ -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)