linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Link platform device resources properly.
@ 2013-01-17 17:26 Pantelis Antoniou
  2013-02-08 22:03 ` Grant Likely
  0 siblings, 1 reply; 2+ messages in thread
From: Pantelis Antoniou @ 2013-01-17 17:26 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: linux-kernel, Matt Porter, Russ Dill, Koen Kooi

The resources of the platform devices created by the OF core were
not properly linked. Make sure that they are, so that we don't get
any crashes when trying to remove the device.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
---
 drivers/of/device.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/of/device.c b/drivers/of/device.c
index 4c74e4f..d75fcaf 100644
--- a/drivers/of/device.c
+++ b/drivers/of/device.c
@@ -62,6 +62,9 @@ int of_device_add(struct platform_device *ofdev)
 	if (!ofdev->dev.parent)
 		set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node));
 
+	/* make sure we add the resources to the appropriate lists */
+	platform_device_link_resources(ofdev);
+
 	return device_add(&ofdev->dev);
 }
 
-- 
1.7.12


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Link platform device resources properly.
  2013-01-17 17:26 [PATCH] Link platform device resources properly Pantelis Antoniou
@ 2013-02-08 22:03 ` Grant Likely
  0 siblings, 0 replies; 2+ messages in thread
From: Grant Likely @ 2013-02-08 22:03 UTC (permalink / raw)
  To: Pantelis Antoniou, Greg Kroah-Hartman
  Cc: linux-kernel, Matt Porter, Russ Dill, Koen Kooi

On Thu, 17 Jan 2013 19:26:36 +0200, Pantelis Antoniou <panto@antoniou-consulting.com> wrote:
> The resources of the platform devices created by the OF core were
> not properly linked. Make sure that they are, so that we don't get
> any crashes when trying to remove the device.
> 
> Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
> ---
>  drivers/of/device.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/of/device.c b/drivers/of/device.c
> index 4c74e4f..d75fcaf 100644
> --- a/drivers/of/device.c
> +++ b/drivers/of/device.c
> @@ -62,6 +62,9 @@ int of_device_add(struct platform_device *ofdev)
>  	if (!ofdev->dev.parent)
>  		set_dev_node(&ofdev->dev, of_node_to_nid(ofdev->dev.of_node));
>  
> +	/* make sure we add the resources to the appropriate lists */
> +	platform_device_link_resources(ofdev);
> +
>  	return device_add(&ofdev->dev);
>  }

As mentioned in the other thread, I've got a patch in my tree that
obsoletes this change.

g.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-08 22:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-17 17:26 [PATCH] Link platform device resources properly Pantelis Antoniou
2013-02-08 22:03 ` Grant Likely

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).