All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] revisiting __SENSOR_DEVICE_ATTR() and array
@ 2005-12-10  6:43 Jim Cromie
  2005-12-10 10:21 ` Jean Delvare
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Jim Cromie @ 2005-12-10  6:43 UTC (permalink / raw)
  To: lm-sensors

Jean, everyone

back in pre-14 days, I proposed a set of patches to hwmon/pc87360.c
Id like to revisit the parts that didnt make it into 2.6.14,
and see whether it might be consistent with some of Greg KHs
longer term plans for sysfs rework  LWN 12/1

So, attached (sorry) is a patch (for discussion purposes), doing:

hwmon-sysfs.h:

gets a new __SENSOR_DEVICE_ATTR, which expands into an initialization, 
like so:

+#define SENSOR_DEVICE_ATTR(_name,_mode,_show,_store,_index)    \
+struct sensor_device_attribute sensor_dev_attr_##_name         \
+       = __SENSOR_DEVICE_ATTR(_name,_mode,_show,_store,_index)


pc87360.c:

replaces many uses of SENSOR_DEVICE_ATTR with
struct sensor_device_attribute array[] = { ..} 
declarations and initializations using the new macro,
and rolls lists of device_create_file into loops over those arrays.

Also includes a few macros that probly arent general enough for a .h,
but are useful abbreviations here


-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diff.SDA-1-okcomp
Url: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20051210/0b08065c/diff-0001.pl

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-12-24 16:04 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-10  6:43 [lm-sensors] revisiting __SENSOR_DEVICE_ATTR() and array Jim Cromie
2005-12-10 10:21 ` Jean Delvare
2005-12-14  4:44 ` Jim Cromie
2005-12-16  4:39 ` Mark M. Hoffman
2005-12-16 17:28 ` Jim Cromie
2005-12-18 16:43 ` Jean Delvare
2005-12-18 17:33 ` Jean Delvare
2005-12-19 11:52 ` Jim Cromie
2005-12-19 16:52 ` Jim Cromie
2005-12-24 15:46 ` Jean Delvare
2005-12-24 16:04 ` Jean Delvare

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.