of/platform: fix of_platform_device_destroy comment
PATCH 1/2 of/platform: fix of_platform_device_destroy comment
Update the comment to of_platform_device_destroy() to reflect that it no longer returns a status value.
Fixes 75f353b61342 ("of/platform: Fix of_platform_device_destroy...")
Signed-off-by Johan Hovold <[email protected]>
--- drivers/of/platform.c | 3 --- 1 file changed, 3 deletions(-)
drivers/of/platform.c +0 -3
@@ -558,9 +558,6 @@ static int of_platform_device_destroy(struct device *dev, void *data)* of the given device (and, recurrently, their children) that have been * created from their respective device tree nodes (and only those, * leaving others - eg. manually created - unharmed). -* -* Returns 0 when all children devices have been removed or -* -EBUSY when some children remained. */ void of_platform_depopulate (struct device *parent) {
Signature · 6 lines
2.7.3 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 of/platform: clarify of_find_device_by_node refcounting
Add comment clarifying that of_find_device_by_node() takes a reference to the embedded struct device which needs to be dropped after use.
Note that most current users fail to do so.
Signed-off-by Johan Hovold <[email protected]>
--- drivers/of/platform.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/of/platform.c +3 -0
@@ -45,6 +45,9 @@ static int of_dev_node_match(struct device *dev, void *data)* of_find_device_by_node - Find the platform_device associated with a node * @np: Pointer to device tree node * +* Takes a reference to the embedded struct device which needs to be dropped +* after use. +* * Returns platform_device pointer, or NULL if not found */ struct platform_device *of_find_device_by_node (struct device_node *np)
Signature · 1 line
2.7.3
Rob Herring
maintainerQuoted 8 lines · Johan Hovold
Update the comment to
of_platform_device_destroy()to reflect that it no longer returns a status value.Fixes 75f353b61342 ("of/platform: Fix of_platform_device_destroy...")Signed-off-by Johan Hovold <[email protected]>--- drivers/of/platform.c | 3 --- 1 file changed, 3 deletions(-)
Both patches applied.
Rob