diff options
author | Michal Marek <mmarek@suse.com> | 2015-10-27 10:24:55 -0400 |
---|---|---|
committer | Michal Marek <mmarek@suse.com> | 2015-11-25 05:23:23 -0500 |
commit | 0046a46a8f93f5b99b499118779521ba3b017d69 (patch) | |
tree | d146db3da6f106442f1b36df9f15102e803846de | |
parent | 8005c49d9aea74d382f474ce11afbbc7d7130bec (diff) |
staging/ad7606: Actually build the interface modules
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>
-rw-r--r-- | drivers/staging/iio/adc/Kconfig | 4 | ||||
-rw-r--r-- | drivers/staging/iio/adc/Makefile | 7 | ||||
-rw-r--r-- | drivers/staging/iio/adc/ad7606_core.c | 4 |
3 files changed, 9 insertions, 6 deletions
diff --git a/drivers/staging/iio/adc/Kconfig b/drivers/staging/iio/adc/Kconfig index 94ae4232ee77..58d4517e1836 100644 --- a/drivers/staging/iio/adc/Kconfig +++ b/drivers/staging/iio/adc/Kconfig | |||
@@ -23,7 +23,7 @@ config AD7606_IFACE_PARALLEL | |||
23 | ADC driver. | 23 | ADC driver. |
24 | 24 | ||
25 | To compile this driver as a module, choose M here: the | 25 | To compile this driver as a module, choose M here: the |
26 | module will be called ad7606_iface_parallel. | 26 | module will be called ad7606_parallel. |
27 | 27 | ||
28 | config AD7606_IFACE_SPI | 28 | config AD7606_IFACE_SPI |
29 | tristate "spi interface support" | 29 | tristate "spi interface support" |
@@ -34,7 +34,7 @@ config AD7606_IFACE_SPI | |||
34 | ADC driver. | 34 | ADC driver. |
35 | 35 | ||
36 | To compile this driver as a module, choose M here: the | 36 | To compile this driver as a module, choose M here: the |
37 | module will be called ad7606_iface_spi. | 37 | module will be called ad7606_spi. |
38 | 38 | ||
39 | config AD7780 | 39 | config AD7780 |
40 | tristate "Analog Devices AD7780 and similar ADCs driver" | 40 | tristate "Analog Devices AD7780 and similar ADCs driver" |
diff --git a/drivers/staging/iio/adc/Makefile b/drivers/staging/iio/adc/Makefile index 1c4277dbd318..0c87ce3530f8 100644 --- a/drivers/staging/iio/adc/Makefile +++ b/drivers/staging/iio/adc/Makefile | |||
@@ -2,10 +2,9 @@ | |||
2 | # Makefile for industrial I/O ADC drivers | 2 | # Makefile for industrial I/O ADC drivers |
3 | # | 3 | # |
4 | 4 | ||
5 | ad7606-y := ad7606_core.o | 5 | ad7606-y := ad7606_core.o ad7606_ring.o |
6 | ad7606-$(CONFIG_IIO_BUFFER) += ad7606_ring.o | 6 | obj-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o |
7 | ad7606-$(CONFIG_AD7606_IFACE_PARALLEL) += ad7606_par.o | 7 | obj-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o |
8 | ad7606-$(CONFIG_AD7606_IFACE_SPI) += ad7606_spi.o | ||
9 | obj-$(CONFIG_AD7606) += ad7606.o | 8 | obj-$(CONFIG_AD7606) += ad7606.o |
10 | 9 | ||
11 | obj-$(CONFIG_AD7780) += ad7780.o | 10 | obj-$(CONFIG_AD7780) += ad7780.o |
diff --git a/drivers/staging/iio/adc/ad7606_core.c b/drivers/staging/iio/adc/ad7606_core.c index 5796ed2409d0..2c9d8b7de9f5 100644 --- a/drivers/staging/iio/adc/ad7606_core.c +++ b/drivers/staging/iio/adc/ad7606_core.c | |||
@@ -559,6 +559,7 @@ error_disable_reg: | |||
559 | regulator_disable(st->reg); | 559 | regulator_disable(st->reg); |
560 | return ERR_PTR(ret); | 560 | return ERR_PTR(ret); |
561 | } | 561 | } |
562 | EXPORT_SYMBOL_GPL(ad7606_probe); | ||
562 | 563 | ||
563 | int ad7606_remove(struct iio_dev *indio_dev, int irq) | 564 | int ad7606_remove(struct iio_dev *indio_dev, int irq) |
564 | { | 565 | { |
@@ -575,6 +576,7 @@ int ad7606_remove(struct iio_dev *indio_dev, int irq) | |||
575 | 576 | ||
576 | return 0; | 577 | return 0; |
577 | } | 578 | } |
579 | EXPORT_SYMBOL_GPL(ad7606_remove); | ||
578 | 580 | ||
579 | void ad7606_suspend(struct iio_dev *indio_dev) | 581 | void ad7606_suspend(struct iio_dev *indio_dev) |
580 | { | 582 | { |
@@ -586,6 +588,7 @@ void ad7606_suspend(struct iio_dev *indio_dev) | |||
586 | gpio_set_value(st->pdata->gpio_stby, 0); | 588 | gpio_set_value(st->pdata->gpio_stby, 0); |
587 | } | 589 | } |
588 | } | 590 | } |
591 | EXPORT_SYMBOL_GPL(ad7606_suspend); | ||
589 | 592 | ||
590 | void ad7606_resume(struct iio_dev *indio_dev) | 593 | void ad7606_resume(struct iio_dev *indio_dev) |
591 | { | 594 | { |
@@ -600,6 +603,7 @@ void ad7606_resume(struct iio_dev *indio_dev) | |||
600 | ad7606_reset(st); | 603 | ad7606_reset(st); |
601 | } | 604 | } |
602 | } | 605 | } |
606 | EXPORT_SYMBOL_GPL(ad7606_resume); | ||
603 | 607 | ||
604 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); | 608 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
605 | MODULE_DESCRIPTION("Analog Devices AD7606 ADC"); | 609 | MODULE_DESCRIPTION("Analog Devices AD7606 ADC"); |