Skip to content

Commit

Permalink
staging:iio:adc:ad7152 set correct number of channels for ad7153.
Browse files Browse the repository at this point in the history
Has been broken for some time.

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>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed Sep 6, 2011
1 parent 3995f91 commit 4050f49
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/staging/iio/adc/ad7152.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,10 @@ static int __devinit ad7152_probe(struct i2c_client *client,
indio_dev->dev.parent = &client->dev;
indio_dev->info = &ad7152_info;
indio_dev->channels = ad7152_channels;
if (id->driver_data == 0)
indio_dev->num_channels = ARRAY_SIZE(ad7152_channels);
else
indio_dev->num_channels = 1;
indio_dev->num_channels = ARRAY_SIZE(ad7152_channels);
indio_dev->modes = INDIO_DIRECT_MODE;

Expand Down Expand Up @@ -430,7 +434,7 @@ static int __devexit ad7152_remove(struct i2c_client *client)

static const struct i2c_device_id ad7152_id[] = {
{ "ad7152", 0 },
{ "ad7153", 0 },
{ "ad7153", 1 },
{}
};

Expand Down

0 comments on commit 4050f49

Please sign in to comment.