Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3e2c96ea authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman
Browse files

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: default avatarJonathan Cameron <jic23@cam.ac.uk>
Reported-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Acked-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Acked-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 41098f8f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -67,6 +67,7 @@ config LIS3L02DQ
	depends on SPI
	select IIO_TRIGGER if IIO_BUFFER
	depends on !IIO_BUFFER || IIO_KFIFO_BUF || IIO_SW_RING
	depends on GENERIC_GPIO
	help
	  Say yes here to build SPI support for the ST microelectronics
	  accelerometer. The driver supplies direct access via sysfs files
+0 −1
Original line number Diff line number Diff line
@@ -8,7 +8,6 @@

#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/gpio.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/device.h>
+3 −4
Original line number Diff line number Diff line
@@ -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);
+1 −0
Original line number Diff line number Diff line
@@ -150,6 +150,7 @@ config AD7746
config AD7816
	tristate "Analog Devices AD7816/7/8 temperature sensor and ADC driver"
	depends on SPI
	depends on GENERIC_GPIO
	help
	  Say yes here to build support for Analog Devices AD7816/7/8
	  temperature sensors and ADC.
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ menu "Analog digital bi-direction convertors"

config ADT7316
	tristate "Analog Devices ADT7316/7/8 ADT7516/7/9 temperature sensor, ADC and DAC driver"
	depends on GENERIC_GPIO
	help
	  Say yes here to build support for Analog Devices ADT7316, ADT7317, ADT7318
	  and ADT7516, ADT7517, ADT7519 temperature sensors, ADC and DAC.
Loading