firmware: arm_scmi: Drop checking for shmem property in parent node
authorSudeep Holla <sudeep.holla@arm.com>
Fri, 27 Mar 2020 16:36:54 +0000 (16:36 +0000)
committerSudeep Holla <sudeep.holla@arm.com>
Tue, 14 Apr 2020 08:31:49 +0000 (09:31 +0100)
The scmi protocol core driver checks for the channel availability
before evaluating the shmem property. If the individual protocols
don't have separate channel assigned to them, the channel alloted
for the BASE protocol is reused automatically.

Therefore there is no need to check for the shmem property in the
parent node if it is absent in the child protocol node.

Link: https://lore.kernel.org/r/20200327163654.13389-5-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>
drivers/firmware/arm_scmi/smc.c

index 5929c668dc1d3ae3f22889f9e34bf8404da5bd96..833e793b53913d895abf33b878cab770843f89a9 100644 (file)
@@ -60,8 +60,6 @@ static int smc_chan_setup(struct scmi_chan_info *cinfo, struct device *dev,
                return -ENOMEM;
 
        np = of_parse_phandle(cdev->of_node, "shmem", 0);
-       if (!np)
-               np = of_parse_phandle(dev->of_node, "shmem", 0);
        ret = of_address_to_resource(np, 0, &res);
        of_node_put(np);
        if (ret) {