Skip to content

Commit

Permalink
staging:iio:attrs - make address a u64 to allow event codes to be used.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 26d25ae commit e614a54
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/staging/iio/iio_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 3 additions & 2 deletions drivers/staging/iio/industrialio-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/staging/iio/sysfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down

0 comments on commit e614a54

Please sign in to comment.