From: jcromie@divsol.com (Jim Cromie)
To: lm-sensors@vger.kernel.org
Subject: [lm-sensors] [patchset 18/23] pc87360 refactor SENSOR_DEVICE_ATTR
Date: Tue, 02 Aug 2005 00:56:14 +0000 [thread overview]
Message-ID: <42EEA84B.4050702@divsol.com> (raw)
refactor SENSOR_DEVICE_ATTR to separate the variable declaraion
and initialization from the initialization expression 'assigned' to it,
making it more friendly to array initialization.
[jimc@harpo pset]$ diffstat 15-sda-arry-initializer
hwmon-sysfs.h | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
-------------- next part --------------
diff -ruNp -X exclude-diffs lxE-5/include/linux/hwmon-sysfs.h lxF-1/include/linux/hwmon-sysfs.h
--- lxE-5/include/linux/hwmon-sysfs.h 2005-07-18 12:36:48.000000000 -0600
+++ lxF-1/include/linux/hwmon-sysfs.h 2005-08-01 10:23:15.000000000 -0600
@@ -27,10 +27,13 @@ struct sensor_device_attribute{
#define to_sensor_dev_attr(_dev_attr) \
container_of(_dev_attr, struct sensor_device_attribute, dev_attr)
-#define SENSOR_DEVICE_ATTR(_name,_mode,_show,_store,_index) \
-struct sensor_device_attribute sensor_dev_attr_##_name = { \
- .dev_attr = __ATTR(_name,_mode,_show,_store), \
- .index = _index, \
+#define __SENSOR_DEVICE_ATTR(_name,_mode,_show,_store,_index) \
+ { .dev_attr = __ATTR(_name,_mode,_show,_store), \
+ .index = _index, \
}
+#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)
+
#endif /* _LINUX_HWMON_SYSFS_H */
reply other threads:[~2005-08-02 0:56 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=42EEA84B.4050702@divsol.com \
--to=jcromie@divsol.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.