Re: Add a private_data pointer to struct device_attribute

2007-11-17 Thread Timur Tabi
Mikael Pettersson wrote: A common trick is to embed a generic struct inside a specific one containing add-on data fields, and then to map from the generic one to the specific one using container_of() in your ops (function pointers). This is both faster and less wasteful of memory than adding

Re: Add a private_data pointer to struct device_attribute

2007-11-17 Thread Timur Tabi
Mikael Pettersson wrote: A common trick is to embed a generic struct inside a specific one containing add-on data fields, and then to map from the generic one to the specific one using container_of() in your ops (function pointers). This is both faster and less wasteful of memory than adding

Re: Add a private_data pointer to struct device_attribute

2007-11-16 Thread Mikael Pettersson
On Fri, 16 Nov 2007 18:11:00 -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

Re: Add a private_data pointer to struct device_attribute

2007-11-16 Thread Greg KH
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 >

Add a private_data pointer to struct device_attribute

2007-11-16 Thread Timur Tabi
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 <[EMAIL PROTECTED]> ---

Add a private_data pointer to struct device_attribute

2007-11-16 Thread Timur Tabi
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 [EMAIL PROTECTED] ---

Re: Add a private_data pointer to struct device_attribute

2007-11-16 Thread Greg KH
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

Re: Add a private_data pointer to struct device_attribute

2007-11-16 Thread Mikael Pettersson
On Fri, 16 Nov 2007 18:11:00 -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