Commit 8aa6e12b authored by Sudeep Holla's avatar Sudeep Holla
Browse files

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: default avatarPeng Fan <peng.fan@nxp.com>
Reviewed-by: default avatarPeng Fan <peng.fan@nxp.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent b9d15ee2
Loading
Loading
Loading
Loading
+5 −0
Original line number Original line Diff line number Diff line
@@ -33,6 +33,11 @@ struct scmi_smc {


static bool smc_chan_available(struct device *dev, int idx)
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;
	return true;
}
}