diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-10-12 09:57:33 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-17 22:25:28 (GMT) |
commit | 3e2c96eab9278317569e2baf165f71042c927712 (patch) | |
tree | 631d28b40256def60f59c27eb083723532fac78a /drivers/staging/iio/accel/sca3000_core.c | |
parent | 41098f8f1473cf853125d2fde2ce936879ef1adc (diff) | |
download | linux-3e2c96eab9278317569e2baf165f71042c927712.tar.xz |
staging:iio: gpio build dependency fixing
Numerous drivers either had pointless includes of gpio.h
or should have been dependent on GENERIC_GPIO and were not.
Conversion of ads1210 to use array registration triggered
build failures that highlighted all was not well.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/accel/sca3000_core.c')
-rw-r--r-- | drivers/staging/iio/accel/sca3000_core.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/staging/iio/accel/sca3000_core.c b/drivers/staging/iio/accel/sca3000_core.c index f2cdb1f..edc62ee 100644 --- a/drivers/staging/iio/accel/sca3000_core.c +++ b/drivers/staging/iio/accel/sca3000_core.c @@ -11,7 +11,6 @@ */ #include <linux/interrupt.h> -#include <linux/gpio.h> #include <linux/fs.h> #include <linux/device.h> #include <linux/slab.h> @@ -1167,7 +1166,7 @@ static int __devinit sca3000_probe(struct spi_device *spi) iio_scan_mask_set(indio_dev->buffer, 2); } - if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0) { + if (spi->irq) { ret = request_threaded_irq(spi->irq, NULL, &sca3000_event_handler, @@ -1184,7 +1183,7 @@ static int __devinit sca3000_probe(struct spi_device *spi) return 0; error_free_irq: - if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0) + if (spi->irq) free_irq(spi->irq, indio_dev); error_unregister_ring: iio_buffer_unregister(indio_dev); @@ -1226,7 +1225,7 @@ static int sca3000_remove(struct spi_device *spi) ret = sca3000_stop_all_interrupts(st); if (ret) return ret; - if (spi->irq && gpio_is_valid(irq_to_gpio(spi->irq)) > 0) + if (spi->irq) free_irq(spi->irq, indio_dev); iio_buffer_unregister(indio_dev); sca3000_unconfigure_ring(indio_dev); |