this patch to drivers/hwmon/w83627hf converts many sysfs items from DEVICE_ATTRs to SENSOR_DEVICE_ATTRs, and replaces macros which expand to define redundant callbacks, with callbacks which use the SENSOR_DEV.nr to know what to do. Signed-off-by: Jim Cromie <jim.cromie at gmail.com> --- $ diffstat hwmon-w83627hf-demacro.patch w83627hf.c | 695 +++++++++++++++++++++++++++++-------------------------------- 1 file changed, 335 insertions(+), 360 deletions(-) hi Jean, I have - avoided cosmetic changes - left sysfs-beep macros, since simple change didnt shrink driver - hoisted most nr-1 offset calcs into declarations I left a few where the callback functions operated differently based upon the nr - changed callback names to match common naming convention in hwmon/*.c I thought this appropriate, since _reg(s)?_ in the names indicated a wrapper/adaptor If I were to keep one of the names in a multi-call-chain, which one ? Im attaching, via webmail. If this gets mangled, Ill resend from pop/thunderbird. -------------- next part -------------- A non-text attachment was scrubbed... Name: hwmon-w83627hf-demacro.patch Type: text/x-patch Size: 31225 bytes Desc: not available Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20070930/fe770697/attachment.bin