Messages in this thread Patch in this message | | | From | peng.fan@nxp ... | Subject | [PATCH 1/2] firmware: arm_scmi: mailbox: share shmem for protocols | Date | Thu, 6 Feb 2020 20:59:25 +0800 |
| |
From: Peng Fan <peng.fan@nxp.com>
When shmem property of protocol is not specificed, let it use its parent's shmem property.
Signed-off-by: Peng Fan <peng.fan@nxp.com> ---
Based on Viresh's V6 patchset.
drivers/firmware/arm_scmi/mailbox.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/drivers/firmware/arm_scmi/mailbox.c b/drivers/firmware/arm_scmi/mailbox.c index 73077bbc4ad9..68ed58e2a47a 100644 --- a/drivers/firmware/arm_scmi/mailbox.c +++ b/drivers/firmware/arm_scmi/mailbox.c @@ -69,6 +69,8 @@ static int mailbox_chan_setup(struct scmi_chan_info *cinfo, struct device *dev, return -ENOMEM; shmem = of_parse_phandle(cdev->of_node, "shmem", idx); + if (!shmem) + shmem = of_parse_phandle(dev->of_node, "shmem", idx); ret = of_address_to_resource(shmem, 0, &res); of_node_put(shmem); if (ret) { -- 2.16.4
| |