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. Also, remove some unnecessary NULL checks. The functions in question already do NULL checks. Signed-off-by: Saravana Kannan <saravanak@google.com> [Srini: removed unnecessary NULL check from other patch] Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20200511151334.362-2-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e270df39f7
commit
dbf4d13382
@@ -162,9 +162,8 @@ static int slim_add_device(struct slim_controller *ctrl,
|
|||||||
sbdev->ctrl = ctrl;
|
sbdev->ctrl = ctrl;
|
||||||
INIT_LIST_HEAD(&sbdev->stream_list);
|
INIT_LIST_HEAD(&sbdev->stream_list);
|
||||||
spin_lock_init(&sbdev->stream_list_lock);
|
spin_lock_init(&sbdev->stream_list_lock);
|
||||||
|
sbdev->dev.of_node = of_node_get(node);
|
||||||
if (node)
|
sbdev->dev.fwnode = of_fwnode_handle(node);
|
||||||
sbdev->dev.of_node = of_node_get(node);
|
|
||||||
|
|
||||||
dev_set_name(&sbdev->dev, "%x:%x:%x:%x",
|
dev_set_name(&sbdev->dev, "%x:%x:%x:%x",
|
||||||
sbdev->e_addr.manf_id,
|
sbdev->e_addr.manf_id,
|
||||||
|
|||||||
Reference in New Issue
Block a user