]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging:iio:attrs - make address a u64 to allow event codes to be used.
authorJonathan Cameron <jic23@cam.ac.uk>
Fri, 2 Sep 2011 16:14:41 +0000 (17:14 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 6 Sep 2011 23:02:01 +0000 (16:02 -0700)
Makes unusual event related attributes look a lot more like the core ones.

V2: Make sure the utils that set these up can handle the codes.
V3: rebase

Reported-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/iio_core.h
drivers/staging/iio/industrialio-core.c
drivers/staging/iio/sysfs.h

index 3a80dbf22200a87fd9f9e4efd6ddefae6c15453a..803bdd8a20e4c4e6f49a0c92eff2bf3773a01fd5 100644 (file)
@@ -22,7 +22,7 @@ int __iio_add_chan_devattr(const char *postfix,
                                                struct device_attribute *attr,
                                                const char *buf,
                                                size_t len),
-                          int mask,
+                          u64 mask,
                           bool generic,
                           struct device *dev,
                           struct list_head *attr_list);
index 49322bf5ac3201da708d1184145ab975cf3763d3..c4985cb0947de3e96aa49b2292de033369c9c4cf 100644 (file)
@@ -515,7 +515,7 @@ int __iio_add_chan_devattr(const char *postfix,
                                                struct device_attribute *attr,
                                                const char *buf,
                                                size_t len),
-                          int mask,
+                          u64 mask,
                           bool generic,
                           struct device *dev,
                           struct list_head *attr_list)
@@ -783,7 +783,8 @@ static ssize_t iio_ev_value_store(struct device *dev,
 static int iio_device_add_event_sysfs(struct iio_dev *dev_info,
                                      struct iio_chan_spec const *chan)
 {
-       int ret = 0, i, mask = 0, attrcount = 0;
+       int ret = 0, i, attrcount = 0;
+       u64 mask = 0;
        char *postfix;
        if (!chan->event_mask)
                return 0;
index 30f9a4df848a2e520e44542f786f533084d2be67..dcb413de2af6a847ac81446413b6800d1f8d2c8d 100644 (file)
@@ -22,7 +22,7 @@ struct iio_chan_spec;
  */
 struct iio_dev_attr {
        struct device_attribute dev_attr;
-       int address;
+       u64 address;
        struct list_head l;
        struct iio_chan_spec const *c;
 };