slimbus: core: Set fwnode for a device when setting of_node
PATCH v2 1/1 slimbus: core: Set fwnode for a device when setting of_node
When setting the of_node for a newly created device, also set the fwnode. This allows fw_devlink feature to work for slimbus devices.
--- drivers/slimbus/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/slimbus/core.c +3 -1
@@ -163,8 +163,10 @@ static int slim_add_device(struct slim_controller *ctrl,INIT_LIST_HEAD (&sbdev->stream_list);spin_lock_init (&sbdev->stream_list_lock); -if (node) +if (node) { sbdev->dev.of_node =of_node_get (node); + sbdev->dev.fwnode =of_fwnode_handle (node); + } dev_set_name(&sbdev->dev, "%x:%x:%x:%x", sbdev->e_addr.manf_id,
Signature · 1 line
2.25.1.696.g5e7596f4ac-goog
Quoted 16 lines · Saravana Kannan
When setting the
of_nodefor a newly created device, also set the fwnode. This allowsfw_devlinkfeature to work for slimbus devices.Signed-off-by Saravana Kannan <[email protected]>--- drivers/slimbus/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/slimbus/core.c +0
-0@@ -163,8 +163,10 @@ static int slim_add_device(struct slim_controller *ctrl,INIT_LIST_HEAD (&sbdev->stream_list);spin_lock_init (&sbdev->stream_list_lock);
drivers/slimbus/core.c static int slim_add_device(struct slim_controller *ctrl,
Quoted 10 lines
drivers/slimbus/core.c +3
-2-if (node) +if (node) { sbdev->dev.of_node =of_node_get (node); + sbdev->dev.fwnode =of_fwnode_handle (node); + } dev_set_name(&sbdev->dev, "%x:%x:%x:%x", sbdev->e_addr.manf_id, --
Hi Srinivas,
Btw, I sent another patch that's on top of this patch.
https://lore.kernel.org/lkml/[email protected]/T/#u
That fixes of_node_get() handling. Didn't notice it before I sent this patch. Otherwise would have made it a series. Sorry about the trouble.
Thanks,
Saravana
Quoted 5 lines · Saravana Kannan
When setting the
of_nodefor a newly created device, also set the fwnode. This allowsfw_devlinkfeature to work for slimbus devices.Signed-off-by Saravana Kannan <[email protected]>
thanks!
-john
Quoted 4 lines · Saravana Kannan
When setting the
of_nodefor a newly created device, also set the fwnode. This allowsfw_devlinkfeature to work for slimbus devices.Signed-off-by Saravana Kannan <[email protected]>
Applied Thanks,
--srini
Quoted 21 lines
--- drivers/slimbus/core.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/slimbus/core.c +3
-1@@ -163,8 +163,10 @@ static int slim_add_device(struct slim_controller *ctrl,INIT_LIST_HEAD (&sbdev->stream_list);spin_lock_init (&sbdev->stream_list_lock); -if (node) +if (node) { sbdev->dev.of_node =of_node_get (node); + sbdev->dev.fwnode =of_fwnode_handle (node); + } dev_set_name(&sbdev->dev, "%x:%x:%x:%x", sbdev->e_addr.manf_id,