]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/ad7606: Actually build the interface modules
authorMichal Marek <mmarek@suse.com>
Tue, 27 Oct 2015 14:24:55 +0000 (15:24 +0100)
committerMichal Marek <mmarek@suse.com>
Wed, 25 Nov 2015 10:23:23 +0000 (11:23 +0100)
The ad7606_par and ad7606_spi drivers are not built if CONFIG_AD7606=m,
because kbuild does not currently support <objname>-m syntax. Even if we
add kbuild support, ad7606 fails to link, because of duplicate
module_init definitions. Make the two drivers separate modules, as the
Kconfig help text already suggests.

Also, CONFIG_IIO_BUFFER is a dependency of CONFIG_AD7606, so there is no
need to test for it in the Makefile.

Signed-off-by: Michal Marek <mmarek@suse.com>
drivers/staging/iio/adc/Kconfig
drivers/staging/iio/adc/Makefile
drivers/staging/iio/adc/ad7606_core.c

index 94ae4232ee773497f650e87c3e20e82842313543..58d4517e18369f984fd1fac9bfe53b9cc9ba4a3a 100644 (file)
@@ -23,7 +23,7 @@ config AD7606_IFACE_PARALLEL
          ADC driver.
 
          To compile this driver as a module, choose M here: the
-         module will be called ad7606_iface_parallel.
+         module will be called ad7606_parallel.
 
 config AD7606_IFACE_SPI
        tristate "spi interface support"
@@ -34,7 +34,7 @@ config AD7606_IFACE_SPI
          ADC driver.
 
          To compile this driver as a module, choose M here: the
-         module will be called ad7606_iface_spi.
+         module will be called ad7606_spi.
 
 config AD7780
        tristate "Analog Devices AD7780 and similar ADCs driver"
index 1c4277dbd31859292b2e07c1dda496c6fe79be72..0c87ce3530f80fbd9c2b787c8f0660171ca5eada 100644 (file)
@@ -2,10 +2,9 @@
 # Makefile for industrial I/O ADC drivers
 #
 
-ad7606-y := ad7606_core.o
-ad7606-$(CONFIG_IIO_BUFFER) += ad7606_ring.o
-ad7606-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
-ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
+ad7606-y := ad7606_core.o ad7606_ring.o
+obj-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o
+obj-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o
 obj-$(CONFIG_AD7606) += ad7606.o
 
 obj-$(CONFIG_AD7780) += ad7780.o
index 5796ed2409d0aff3938c13cfb331c0450d620e04..2c9d8b7de9f5d060545bc48430ef836d0693572b 100644 (file)
@@ -559,6 +559,7 @@ error_disable_reg:
                regulator_disable(st->reg);
        return ERR_PTR(ret);
 }
+EXPORT_SYMBOL_GPL(ad7606_probe);
 
 int ad7606_remove(struct iio_dev *indio_dev, int irq)
 {
@@ -575,6 +576,7 @@ int ad7606_remove(struct iio_dev *indio_dev, int irq)
 
        return 0;
 }
+EXPORT_SYMBOL_GPL(ad7606_remove);
 
 void ad7606_suspend(struct iio_dev *indio_dev)
 {
@@ -586,6 +588,7 @@ void ad7606_suspend(struct iio_dev *indio_dev)
                gpio_set_value(st->pdata->gpio_stby, 0);
        }
 }
+EXPORT_SYMBOL_GPL(ad7606_suspend);
 
 void ad7606_resume(struct iio_dev *indio_dev)
 {
@@ -600,6 +603,7 @@ void ad7606_resume(struct iio_dev *indio_dev)
                ad7606_reset(st);
        }
 }
+EXPORT_SYMBOL_GPL(ad7606_resume);
 
 MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>");
 MODULE_DESCRIPTION("Analog Devices AD7606 ADC");