All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] [patch 2/2] hwmon/pc87360: combine sysfs callbacks
@ 2006-01-26 19:57 Jim Cromie
  0 siblings, 0 replies; only message in thread
From: Jim Cromie @ 2006-01-26 19:57 UTC (permalink / raw)
  To: lm-sensors

From: Jim Cromie <jim.cromie at gmail.com>

2. hwmon-pc87360-sysfs-combo-callbacks.patch

This combines individual  (show|set)_Sensor_Attr callbacks into
(show|set)_Sensor callbacks that handle all that Sensor's Attrs,
based upon value in sensor_device_attribute_2.nr

Signed-off-by:  Jim Cromie <jim.cromie at gmail.com>
---

diffstat hwmon-pc87360-sysfs-combo-callbacks.patch
 pc87360.c |  545 
+++++++++++++++++++++++++++-----------------------------------
 1 files changed, 246 insertions(+), 299 deletions(-)

patch yields a non-trivial size reduction (b4, after)
 14588    3224      16   17828    45a4 A-2/drivers/hwmon/pc87360.ko
 13124    3224      16   16364    3fec A-3/drivers/hwmon/pc87360.ko
ie about 10%

Combining all show_X (for all X) together is possible, but would 
compromise clarity,
(ie the separation of the sensor code) and would save only ~ 1/5 th 
additional space.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: hwmon-pc87360-sysfs-combo-callbacks.patch
Type: text/x-patch
Size: 31627 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20060126/ff45db23/hwmon-pc87360-sysfs-combo-callbacks-0001.bin

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-01-26 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-26 19:57 [lm-sensors] [patch 2/2] hwmon/pc87360: combine sysfs callbacks Jim Cromie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.