Re: Add a private_data pointer to struct device_attribute

Greg KH
2007-11-17T01:08:45Z

On Fri, Nov 16, 2007 at 06:11:00PM -0600, Timur Tabi wrote:
> A private data pointer in struct device_attribute allows the 'show' and 'store'
> functions to access instance data. This handy in situations where the
> driver_data and platform_data pointers of 'struct device' are already used
> for other purposes.
>
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
>
> Greg, can you tell me if you think this patch is a good idea? It doesn't
> appear to do any harm, and I'm working on an ALSA driver that could benefit
> for this patch. I think 2.6.25 would be a good target.

Huh? Why is this needed? Can you give me a usage case for it? Why
would you just not use the pointer to the attribute itself to identify
it? All device specific information should be stored in the struct
device structure, as that is what describes the device, not the
attribute.

confused,

greg k-h