Re: [PATCH] rust: device: add platdata accessors
From: Greg Kroah-Hartman
Date: Thu Jan 08 2026 - 06:43:29 EST
On Thu, Jan 08, 2026 at 04:55:45PM +0800, pengfuyuan wrote:
> Implement generic accessors for the platform data of a device.
>
> Platform data is typically set by platform code when creating the device
> and points to platform-specific data structures. The accessor provides
> type-safe access to this data without requiring unsafe code at the call
> site.
>
> The accessor is implemented for Device<Bound>, allowing drivers to access
> platform data during probe() and other device lifecycle callbacks. Unlike
> drvdata, platform data is managed by platform code and has a lifetime
> tied to the device itself.
>
> Signed-off-by: pengfuyuan <pengfuyuan@xxxxxxxxxx>
Again, use your name, not your email alias, to sign off on something.
thanks,
greg k-h