aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-12-14 12:59:59 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-12-14 12:59:59 -0500
commit2d9c8b5d6a5f5f7a6111cc68a050b5b44729376b (patch)
tree9382e643df9d4115637ca320822702bb06130c1f /include/linux/device.h
parent17bc14b767cf0692420c43dbe5310ae98a5a7836 (diff)
parent003db633d6f2d3649ea18652a3c55ad17d4f0e47 (diff)
Merge branch 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 RAS update from Ingo Molnar: "Rework all config variables used throughout the MCA code and collect them together into a mca_config struct. This keeps them tightly and neatly packed together instead of spilled all over the place. Then, convert those which are used as booleans into real booleans and save some space. These bits are exposed via /sys/devices/system/machinecheck/machinecheck*/" * 'x86-ras-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86, MCA: Finish mca_config conversion x86, MCA: Convert the next three variables batch x86, MCA: Convert rip_msr, mce_bootlog, monarch_timeout x86, MCA: Convert dont_log_ce, banks and tolerant drivers/base: Add a DEVICE_BOOL_ATTR macro
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 05292e488346..43dcda937ddf 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -498,6 +498,10 @@ ssize_t device_show_int(struct device *dev, struct device_attribute *attr,
498 char *buf); 498 char *buf);
499ssize_t device_store_int(struct device *dev, struct device_attribute *attr, 499ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
500 const char *buf, size_t count); 500 const char *buf, size_t count);
501ssize_t device_show_bool(struct device *dev, struct device_attribute *attr,
502 char *buf);
503ssize_t device_store_bool(struct device *dev, struct device_attribute *attr,
504 const char *buf, size_t count);
501 505
502#define DEVICE_ATTR(_name, _mode, _show, _store) \ 506#define DEVICE_ATTR(_name, _mode, _show, _store) \
503 struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store) 507 struct device_attribute dev_attr_##_name = __ATTR(_name, _mode, _show, _store)
@@ -507,6 +511,9 @@ ssize_t device_store_int(struct device *dev, struct device_attribute *attr,
507#define DEVICE_INT_ATTR(_name, _mode, _var) \ 511#define DEVICE_INT_ATTR(_name, _mode, _var) \
508 struct dev_ext_attribute dev_attr_##_name = \ 512 struct dev_ext_attribute dev_attr_##_name = \
509 { __ATTR(_name, _mode, device_show_int, device_store_int), &(_var) } 513 { __ATTR(_name, _mode, device_show_int, device_store_int), &(_var) }
514#define DEVICE_BOOL_ATTR(_name, _mode, _var) \
515 struct dev_ext_attribute dev_attr_##_name = \
516 { __ATTR(_name, _mode, device_show_bool, device_store_bool), &(_var) }
510#define DEVICE_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \ 517#define DEVICE_ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) \
511 struct device_attribute dev_attr_##_name = \ 518 struct device_attribute dev_attr_##_name = \
512 __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store) 519 __ATTR_IGNORE_LOCKDEP(_name, _mode, _show, _store)