Linux IIO development
 help / color / mirror / Atom feed
* [PATCH] staging: (iio) restore macro IIO_ATTR_2
@ 2011-07-22 22:26 Vivien Didelot
  2011-07-25 11:30 ` Jonathan Cameron
  0 siblings, 1 reply; 6+ messages in thread
From: Vivien Didelot @ 2011-07-22 22:26 UTC (permalink / raw)
  To: linux-iio; +Cc: Vivien Didelot, Jonathan Cameron, Greg KH

For some reason, IIO_ATTR_2 has been deleted by commit
99e5dc45b854b4b661044e807905152911ed3fdb but it is still used by the macro
IIO_DEVICE_ATTR_2. This patch restores it.
Please ignore it if it shouldn't exist anymore. If so, this would need to
remove IIO_DEVICE_ATTR_2 as well. Obviously it seems to be useful as the struct
iio_dev_attr has a val2 member.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 drivers/staging/iio/sysfs.h |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/staging/iio/sysfs.h b/drivers/staging/iio/sysfs.h
index dd79b58..cfc0965 100644
--- a/drivers/staging/iio/sysfs.h
+++ b/drivers/staging/iio/sysfs.h
@@ -56,6 +56,11 @@ struct iio_const_attr {
 	{ .dev_attr = __ATTR(_name, _mode, _show, _store),	\
 	  .address = _addr }
 
+#define IIO_ATTR_2(_name, _mode, _show, _store, _addr, _val2)	\
+	{ .dev_attr = __ATTR(_name, _mode, _show, _store),	\
+	  .address = _addr,					\
+	  .val2 = _val2 }
+
 #define IIO_DEVICE_ATTR(_name, _mode, _show, _store, _addr)	\
 	struct iio_dev_attr iio_dev_attr_##_name		\
 	= IIO_ATTR(_name, _mode, _show, _store, _addr)
-- 
1.7.6

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

end of thread, other threads:[~2011-07-26 11:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-22 22:26 [PATCH] staging: (iio) restore macro IIO_ATTR_2 Vivien Didelot
2011-07-25 11:30 ` Jonathan Cameron
2011-07-25 15:51   ` Vivien Didelot
2011-07-25 16:14     ` Jonathan Cameron
2011-07-25 18:48       ` Vivien Didelot
2011-07-26 11:50       ` Hennerich, Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox