mfd: take OF node reference for MFD cell platform device
PATCH 1/1 mfd: take OF node reference for MFD cell platform device
Properly increase OF node reference count when assigning it to a platform device created for an MFD cell.
--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mfd/mfd-core.c +1 -1
@@ -161,7 +161,7 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev, of_entry->np = np;list_add_tail (&of_entry->list, &mfd_of_node_list); - pdev->dev.of_node = np; + pdev->dev.of_node =of_node_get (np); pdev->dev.fwnode = &np->fwnode;#endif return 0 ;
Signature · 1 line
2.34.1
Lee Jones
maintainerQuoted 13 lines · Sebastian Urban
Properly increase OF node reference count when assigning it to a platform device created for an MFD cell.
Signed-off-by Sebastian Urban <[email protected]>--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mfd/mfd-core.c +0
-0
drivers/mfd/mfd-core.c static int mfd_match_of_node_to_dev(struct platform_device *pdev, · line 164
Quoted 5 lines
drivers/mfd/mfd-core.c +1
-1@@ -161,7 +161,7 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev, of_entry->np = np;list_add_tail (&of_entry->list, &mfd_of_node_list); - pdev->dev.of_node = np; + pdev->dev.of_node =of_node_get (np);
Doesn't this cause an imbalance?
Or is there already a put somewhere?
Quoted 3 lines
drivers/mfd/mfd-core.c +0
-0pdev->dev.fwnode = &np->fwnode;#endif return 0 ;
Signature · 1 line
Lee Jones [李琼斯]
Lee Jones
maintainerQuoted 18 lines · Lee Jones
Quoted 16 lines · Sebastian Urban
Properly increase OF node reference count when assigning it to a platform device created for an MFD cell.
Signed-off-by Sebastian Urban <[email protected]>--- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/mfd/mfd-core.c +0
-0@@ -161,7 +161,7 @@ static int mfd_match_of_node_to_dev(struct platform_device *pdev, of_entry->np = np;list_add_tail (&of_entry->list, &mfd_of_node_list);
Quoted 6 lines
drivers/mfd/mfd-core.c static int mfd_match_of_node_to_dev(struct platform_device *pdev, · line 164
Quoted 2 lines
drivers/mfd/mfd-core.c +1
-1- pdev->dev.of_node = np; + pdev->dev.of_node =of_node_get (np);Doesn't this cause an imbalance?
Or is there already a put somewhere?
I can't accept this until you've answered my queries.
Signature · 1 line
Lee Jones [李琼斯]