From: jim.cromie@gmail.com (Jim Cromie)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] revisiting __SENSOR_DEVICE_ATTR() and array
Date: Sat, 10 Dec 2005 06:43:29 +0000 [thread overview]
Message-ID: <439A7911.5020904@gmail.com> (raw)
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
next reply other threads:[~2005-12-10 6:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-10 6:43 Jim Cromie [this message]
2005-12-10 10:21 ` [lm-sensors] revisiting __SENSOR_DEVICE_ATTR() and array 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=439A7911.5020904@gmail.com \
--to=jim.cromie@gmail.com \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.