summaryrefslogtreecommitdiff
path: root/drivers/firmware/arm_scmi
diff options
context:
space:
mode:
authorSudeep Holla <sudeep.holla@arm.com>2020-03-27 16:36:53 +0000
committerSudeep Holla <sudeep.holla@arm.com>2020-04-14 09:31:48 +0100
commit8aa6e12bbf9dd6cf1ebf2aad7b09389863a4c2c6 (patch)
treef54aad5840c40139d46872e611b99cd6ac4315c1 /drivers/firmware/arm_scmi
parentb9d15ee21cd8cf088ac574649ae7ac2fefaa440a (diff)
firmware: arm_scmi: Check shmem property for channel availablity
Instead of declaring the channel availabilty unconditionally, let us check for the presence of "shmem" property and return the channel availablity accordingly. Link: https://lore.kernel.org/r/20200327163654.13389-4-sudeep.holla@arm.com Tested-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'drivers/firmware/arm_scmi')
-rw-r--r--drivers/firmware/arm_scmi/smc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/firmware/arm_scmi/smc.c b/drivers/firmware/arm_scmi/smc.c
index dd4b54c29679..5929c668dc1d 100644
--- a/drivers/firmware/arm_scmi/smc.c
+++ b/drivers/firmware/arm_scmi/smc.c
@@ -33,6 +33,11 @@ struct scmi_smc {
static bool smc_chan_available(struct device *dev, int idx)
{
+ struct device_node *np = of_parse_phandle(dev->of_node, "shmem", 0);
+ if (!np)
+ return false;
+
+ of_node_put(np);
return true;
}