[PATCH v3 2/2] gpu: host1x: Stop open-coding of_device_uevent()

Thierry Reding thierry.reding at gmail.com
Fri Jul 21 10:22:45 UTC 2023


On Thu, Jun 22, 2023 at 11:32:14PM +0200, Miquel Raynal wrote:
> There is apparently no reasons to open-code of_device_uevent() besides:
> - The helper receives a struct device while we want to use the of_node
>   member of the struct device *parent*.
> - of_device_uevent() could not be called by modules because of a missing
>   EXPORT_SYMBOL*().
> 
> In practice, the former point is not very constraining, just calling
> of_device_uevent(dev->parent, ...) would have made the trick.

Yeah, looks like that's correct. I guess I always thought this
information would get added to the sysfs node of the struct device *
that was passed in, while it actually gets passed to the environment
created for the struct device passed into the caller. In other words
what we pass to of_device_uevent() here is only ever used as a source of
information, so passing dev->parent works.

I've also verified this on Tegra30 Beaver just to make sure and it looks
like the generated uevent file is identical before and after this patch.

Applied to drm-misc, thanks.

Thierry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20230721/766932b7/attachment.sig>


More information about the dri-devel mailing list