Re: [PATCH 1/2] driver core:add device's platform_data set for faux device
From: Greg KH
Date: Thu May 08 2025 - 05:45:37 EST
On Thu, May 08, 2025 at 05:11:47PM +0800, Zongmin Zhou wrote:
> From: Zongmin Zhou <zhouzongmin@xxxxxxxxxx>
>
> Most drivers based on platform bus may have specific data
> for the device.And will get this specific data to use
> after device added.
> So keep the setting for device's platform_data is necessary
> for converting platform device to faux device.
I do not understand, why not just use the platform_data field directly
in the faux device structure? Why change all callers to now have to
keep track of an additional pointer in these create functions? That
just adds complexity for everyone when almost no one will need it.
thanks,
greg k-h