[RFC PATCH 2.6.12-rc3] dynamic driver sysfs callbacks and RFC on bmcsensor rewrite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Apr 25, 2005 at 01:36:56AM -0400, Yani Ioannou wrote:
> Hi all,
> 
> I'm sending this driver sysfs callback patch to the lm-sensors list to
> get more of the sensor driver maintainer's comments on the patch
> (specifically the type to be associated with each sysfs entry) before
> submitting to LKML. Jean and Greg have already given me invaluable
> feedback and are supportive of the general idea of the patch (the
> problem of which is epitomized by the kludge the 2.6 bmcsensors driver
> is at the moment - see previous discussions in the list archive).
> 
> Included is a patch against drivers/base/core.c and
> include/linux/driver.h that adds a void * to the device attribute
> struct and passes it back to the two sysfs callbacks show/store. Also
> included is a simple perl script we can run against the source tree to
> update drivers to use the correct callback pointer types (otherwise
> warnings are generated on compile for each). Of course 'real' fixes in
> the spirit of the new callbacks would be to use the void */passed type
> to implement a single/few dynamic callback instead of the messy static
> callbacks at present, but I leave that up to the individual driver
> maintainer.

Care to show how a driver would use this change?

And the void * shouldn't be called ptr, use what other structures call
their void pointers, "data", "private", etc.

thanks,

greg k-h



[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux