From: Sudeep Holla <sudeep.holla@arm.com>
To: Jassi Brar <jassisinghbrar@gmail.com>,
Jassi Brar <jaswinder.singh@linaro.org>,
Viresh Kumar <viresh.kumar@linaro.org>,
ALKML <linux-arm-kernel@lists.infradead.org>,
DTML <devicetree@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Frank Rowand <frowand.list@gmail.com>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Rob Herring <robh@kernel.org>, Rob Herring <robh+dt@kernel.org>
Subject: [PATCH v2 3/4] mailbox: arm_mhu: Match only if compatible is "arm,mhu"
Date: Thu, 8 Oct 2020 20:14:51 +0100 [thread overview]
Message-ID: <20201008191452.38672-4-sudeep.holla@arm.com> (raw)
In-Reply-To: <20201008191452.38672-1-sudeep.holla@arm.com>
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>
---
drivers/mailbox/arm_mhu.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/mailbox/arm_mhu.c b/drivers/mailbox/arm_mhu.c
index 9da236552bd7..b7fbf276eb62 100644
--- a/drivers/mailbox/arm_mhu.c
+++ b/drivers/mailbox/arm_mhu.c
@@ -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)
--
2.17.1
next prev parent reply other threads:[~2020-10-08 19:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-08 19:14 [PATCH v2 0/4] mailbox: arm_mhu: Add ARM MHU doorbell controller driver Sudeep Holla
2020-10-08 19:14 ` [PATCH v2 1/4] dt-bindings: mailbox : arm,mhu: Convert to Json-schema Sudeep Holla
2020-10-08 19:14 ` [PATCH v2 2/4] dt-bindings: mailbox: add doorbell support to ARM MHU Sudeep Holla
2020-10-08 19:14 ` Sudeep Holla [this message]
2020-10-08 19:14 ` [PATCH v2 4/4] mailbox: arm_mhu: Add ARM MHU doorbell driver Sudeep Holla
2020-10-09 4:22 ` [PATCH v2 0/4] mailbox: arm_mhu: Add ARM MHU doorbell controller driver Viresh Kumar
2020-10-09 11:31 ` Sudeep Holla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201008191452.38672-4-sudeep.holla@arm.com \
--to=sudeep.holla@arm.com \
--cc=bjorn.andersson@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=frowand.list@gmail.com \
--cc=jassisinghbrar@gmail.com \
--cc=jaswinder.singh@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=robh@kernel.org \
--cc=vincent.guittot@linaro.org \
--cc=viresh.kumar@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®