diff mbox series

[RFC] slimbus: core: Set fwnode for a device when setting of_node

Message ID 20200605211925.87873-1-john.stultz@linaro.org (mailing list archive)
State New, archived
Headers show
Series [RFC] slimbus: core: Set fwnode for a device when setting of_node | expand

Commit Message

John Stultz June 5, 2020, 9:19 p.m. UTC
From: Saravana Kannan <saravanak@google.com>

When setting the of_node for a newly created device, also set the
fwnode. This allows fw_devlink to work for slimbus devices.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: alsa-devel@alsa-project.org
Signed-off-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
 drivers/slimbus/core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Saravana Kannan June 5, 2020, 9:43 p.m. UTC | #1
Hi John,

On Fri, Jun 5, 2020 at 2:19 PM John Stultz <john.stultz@linaro.org> wrote:
>
> From: Saravana Kannan <saravanak@google.com>
>
> When setting the of_node for a newly created device, also set the
> fwnode. This allows fw_devlink to work for slimbus devices.
>
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: alsa-devel@alsa-project.org
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> Signed-off-by: John Stultz <john.stultz@linaro.org>

I thought Srinivas already picked this up and sent it to Greg.
https://lore.kernel.org/lkml/20200511151334.362-1-srinivas.kandagatla@linaro.org/

Am I missing something?

-Saravana
John Stultz June 5, 2020, 10:01 p.m. UTC | #2
On Fri, Jun 5, 2020 at 2:44 PM Saravana Kannan <saravanak@google.com> wrote:
> On Fri, Jun 5, 2020 at 2:19 PM John Stultz <john.stultz@linaro.org> wrote:
> >
> > From: Saravana Kannan <saravanak@google.com>
> >
> > When setting the of_node for a newly created device, also set the
> > fwnode. This allows fw_devlink to work for slimbus devices.
> >
> > Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> > Cc: alsa-devel@alsa-project.org
> > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > Signed-off-by: John Stultz <john.stultz@linaro.org>
>
> I thought Srinivas already picked this up and sent it to Greg.
> https://lore.kernel.org/lkml/20200511151334.362-1-srinivas.kandagatla@linaro.org/
>

Oh! I'm sorry, I missed that! That's great to hear!

thanks
-john
diff mbox series

Patch

diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index 526e3215d8fe..44228a5b246d 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -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,