Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1175598 > unrolled thread

Re: [PATCH v1 01/10] of/platform: Set fwnode field for new devices

Started by"Rafael J. Wysocki" <rjw@rjwysocki.net>
First post2015-07-02 01:10 +0200
Last post2015-07-02 01:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v1 01/10] of/platform: Set fwnode field for new devices "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2015-07-02 01:10 +0200

#1175598 — Re: [PATCH v1 01/10] of/platform: Set fwnode field for new devices

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2015-07-02 01:10 +0200
SubjectRe: [PATCH v1 01/10] of/platform: Set fwnode field for new devices
Message-ID<pHziF-3cE-7@gated-at.bofh.it>
On Tuesday, June 30, 2015 04:54:59 PM Tomeu Vizoso wrote:
> When allocating a new platform device, set the fwnode field in the
> struct device to point to the device_node.
> 
> Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
> ---
> 
>  drivers/of/platform.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/of/platform.c b/drivers/of/platform.c
> index ddf8e42..e880f55 100644
> --- a/drivers/of/platform.c
> +++ b/drivers/of/platform.c
> @@ -139,6 +139,7 @@ struct platform_device *of_device_alloc(struct device_node *np,
>  	}
>  
>  	dev->dev.of_node = of_node_get(np);
> +	dev->dev.fwnode = &dev->dev.of_node->fwnode;

What about using set_primary_fwnode() instead of the direct assignment?

Or even having a macro analogous to ACPI_COMPANION_SET() for this purpose?

>  	dev->dev.parent = parent ? : &platform_bus;
>  
>  	if (bus_id)
> 

-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web