lkml.org 
[lkml]   [2020]   [Feb]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] firmware: arm_scmi: mailbox: share shmem for protocols
Date
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
\
 
 \ /
  Last update: 2020-02-06 14:05    [W:0.060 / U:2.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site