diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-08-30 12:32:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-06 15:59:09 -0700 |
commit | 8e7d967244a8eebcdadb048efc5e66849ec0a6b6 (patch) | |
tree | bd31fadb1af43f0a4c3f7b49709a9acf4c20aa23 /drivers/staging/iio/adc/max1363_core.c | |
parent | 7ae8cf6275589a9ebb733eb5bdd093859ba1be36 (diff) |
staging: iio: remove specific chrdev for event reading. Get fd from ioctl on buffer.
Change suggested by Arnd Bergmann.
No real reason to have two chrdevs per device. This step merges them into one.
Currently this means that events will only work on devices with buffers. THat will
be remedied shortly.
V2: set name for event attribute groups. Otherwise they all sorts of fun occurs on
dynamic channel event attribute creation.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/adc/max1363_core.c')
-rw-r--r-- | drivers/staging/iio/adc/max1363_core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index e10a4d828146..0bf7b74966b5 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c @@ -827,6 +827,7 @@ static struct attribute *max1363_event_attributes[] = { static struct attribute_group max1363_event_attribute_group = { .attrs = max1363_event_attributes, + .name = "events", }; #define MAX1363_EVENT_FUNCS \ @@ -1296,7 +1297,8 @@ static int __devinit max1363_probe(struct i2c_client *client, /* Estabilish that the iio_dev is a child of the i2c device */ indio_dev->dev.parent = &client->dev; indio_dev->name = id->name; - + indio_dev->channels = st->chip_info->channels; + indio_dev->num_channels = st->chip_info->num_channels; indio_dev->info = st->chip_info->info; indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->channels = st->chip_info->channels; |