* [PATCH 1/2] of/platform: fix of_platform_device_destroy comment
@ 2016-11-01 10:53 Johan Hovold
2016-11-01 10:53 ` [PATCH 2/2] of/platform: clarify of_find_device_by_node refcounting Johan Hovold
2016-11-10 20:56 ` [PATCH 1/2] of/platform: fix of_platform_device_destroy comment Rob Herring
0 siblings, 2 replies; 3+ messages in thread
From: Johan Hovold @ 2016-11-01 10:53 UTC (permalink / raw)
To: Rob Herring
Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA, 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 <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
drivers/of/platform.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index e4bf07d20f9b..cb4c7800f37d 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -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)
{
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] of/platform: clarify of_find_device_by_node refcounting
2016-11-01 10:53 [PATCH 1/2] of/platform: fix of_platform_device_destroy comment Johan Hovold
@ 2016-11-01 10:53 ` Johan Hovold
2016-11-10 20:56 ` [PATCH 1/2] of/platform: fix of_platform_device_destroy comment Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Johan Hovold @ 2016-11-01 10:53 UTC (permalink / raw)
To: Rob Herring; +Cc: Frank Rowand, devicetree, linux-kernel, Johan Hovold
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 <johan@kernel.org>
---
drivers/of/platform.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/of/platform.c b/drivers/of/platform.c
index cb4c7800f37d..b8064bc2b6eb 100644
--- a/drivers/of/platform.c
+++ b/drivers/of/platform.c
@@ -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)
--
2.7.3
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] of/platform: fix of_platform_device_destroy comment
2016-11-01 10:53 [PATCH 1/2] of/platform: fix of_platform_device_destroy comment Johan Hovold
2016-11-01 10:53 ` [PATCH 2/2] of/platform: clarify of_find_device_by_node refcounting Johan Hovold
@ 2016-11-10 20:56 ` Rob Herring
1 sibling, 0 replies; 3+ messages in thread
From: Rob Herring @ 2016-11-10 20:56 UTC (permalink / raw)
To: Johan Hovold; +Cc: Frank Rowand, devicetree, linux-kernel
On Tue, Nov 01, 2016 at 11:53:21AM +0100, Johan Hovold wrote:
> 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 <johan@kernel.org>
> ---
> drivers/of/platform.c | 3 ---
> 1 file changed, 3 deletions(-)
Both patches applied.
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-11-10 20:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-01 10:53 [PATCH 1/2] of/platform: fix of_platform_device_destroy comment Johan Hovold
2016-11-01 10:53 ` [PATCH 2/2] of/platform: clarify of_find_device_by_node refcounting Johan Hovold
2016-11-10 20:56 ` [PATCH 1/2] of/platform: fix of_platform_device_destroy comment Rob Herring
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).