* [PATCH] OF: Link platform device resources properly.
@ 2013-01-03 22:31 Pantelis Antoniou
2013-01-14 14:57 ` Rob Herring
0 siblings, 1 reply; 2+ messages in thread
From: Pantelis Antoniou @ 2013-01-03 22:31 UTC (permalink / raw)
To: Grant Likely
Cc: Matt Porter, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
Pantelis Antoniou, linux-kernel-u79uwXL29TY76Z2rM5mHXA,
Rob Herring, Russ Dill
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-wVdstyuyKrO8r51toPun2/C9HSW9iNxf@public.gmane.org>
---
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] OF: Link platform device resources properly.
2013-01-03 22:31 [PATCH] OF: Link platform device resources properly Pantelis Antoniou
@ 2013-01-14 14:57 ` Rob Herring
0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2013-01-14 14:57 UTC (permalink / raw)
To: Pantelis Antoniou
Cc: Grant Likely, Matt Porter, devicetree-discuss, linux-kernel,
Russ Dill
On 01/03/2013 04:31 PM, Pantelis Antoniou 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);
> +
Submit this with the patch that adds this function or state the
dependency please.
Rob
> return device_add(&ofdev->dev);
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-01-14 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-03 22:31 [PATCH] OF: Link platform device resources properly Pantelis Antoniou
2013-01-14 14:57 ` 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).