Commit 89089158 authored by Randy Dunlap's avatar Randy Dunlap Committed by Greg Kroah-Hartman

Staging: fix more iio builds when IIO_RING_BUFFER is not enabled

Fix lots more build errors in staging/iio when CONFIG_IIO_RING_BUFFER
is not enabled by moving enums and defines outside of the
CONFIG_IIO_RING_BUFFER ifdef block.

Examples (one from each driver; there were 116 total errors):

drivers/staging/iio/accel/adis16204_core.c:437: error: 'ADIS16204_SCAN_SUPPLY' undeclared here (not in a function)
drivers/staging/iio/accel/adis16209_core.c:410: error: 'ADIS16209_SCAN_SUPPLY' undeclared here (not in a function)
drivers/staging/iio/gyro/adis16260_core.c:420: error: 'ADIS16260_SCAN_GYRO' undeclared here (not in a function)
drivers/staging/iio/imu/adis16400_core.c:565: error: 'ADIS16400_SCAN_SUPPLY' undeclared here (not in a function)
Signed-off-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
Acked-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 2c53b436
...@@ -84,7 +84,6 @@ struct adis16204_state { ...@@ -84,7 +84,6 @@ struct adis16204_state {
int adis16204_set_irq(struct iio_dev *indio_dev, bool enable); int adis16204_set_irq(struct iio_dev *indio_dev, bool enable);
#ifdef CONFIG_IIO_RING_BUFFER
enum adis16204_scan { enum adis16204_scan {
ADIS16204_SCAN_SUPPLY, ADIS16204_SCAN_SUPPLY,
ADIS16204_SCAN_ACC_X, ADIS16204_SCAN_ACC_X,
...@@ -93,6 +92,7 @@ enum adis16204_scan { ...@@ -93,6 +92,7 @@ enum adis16204_scan {
ADIS16204_SCAN_TEMP, ADIS16204_SCAN_TEMP,
}; };
#ifdef CONFIG_IIO_RING_BUFFER
void adis16204_remove_trigger(struct iio_dev *indio_dev); void adis16204_remove_trigger(struct iio_dev *indio_dev);
int adis16204_probe_trigger(struct iio_dev *indio_dev); int adis16204_probe_trigger(struct iio_dev *indio_dev);
......
...@@ -121,8 +121,6 @@ struct adis16209_state { ...@@ -121,8 +121,6 @@ struct adis16209_state {
int adis16209_set_irq(struct iio_dev *indio_dev, bool enable); int adis16209_set_irq(struct iio_dev *indio_dev, bool enable);
#ifdef CONFIG_IIO_RING_BUFFER
#define ADIS16209_SCAN_SUPPLY 0 #define ADIS16209_SCAN_SUPPLY 0
#define ADIS16209_SCAN_ACC_X 1 #define ADIS16209_SCAN_ACC_X 1
#define ADIS16209_SCAN_ACC_Y 2 #define ADIS16209_SCAN_ACC_Y 2
...@@ -132,6 +130,8 @@ int adis16209_set_irq(struct iio_dev *indio_dev, bool enable); ...@@ -132,6 +130,8 @@ int adis16209_set_irq(struct iio_dev *indio_dev, bool enable);
#define ADIS16209_SCAN_INCLI_Y 6 #define ADIS16209_SCAN_INCLI_Y 6
#define ADIS16209_SCAN_ROT 7 #define ADIS16209_SCAN_ROT 7
#ifdef CONFIG_IIO_RING_BUFFER
void adis16209_remove_trigger(struct iio_dev *indio_dev); void adis16209_remove_trigger(struct iio_dev *indio_dev);
int adis16209_probe_trigger(struct iio_dev *indio_dev); int adis16209_probe_trigger(struct iio_dev *indio_dev);
......
...@@ -104,7 +104,6 @@ struct adis16260_state { ...@@ -104,7 +104,6 @@ struct adis16260_state {
int adis16260_set_irq(struct iio_dev *indio_dev, bool enable); int adis16260_set_irq(struct iio_dev *indio_dev, bool enable);
#ifdef CONFIG_IIO_RING_BUFFER
/* At the moment triggers are only used for ring buffer /* At the moment triggers are only used for ring buffer
* filling. This may change! * filling. This may change!
*/ */
...@@ -115,6 +114,7 @@ int adis16260_set_irq(struct iio_dev *indio_dev, bool enable); ...@@ -115,6 +114,7 @@ int adis16260_set_irq(struct iio_dev *indio_dev, bool enable);
#define ADIS16260_SCAN_TEMP 3 #define ADIS16260_SCAN_TEMP 3
#define ADIS16260_SCAN_ANGL 4 #define ADIS16260_SCAN_ANGL 4
#ifdef CONFIG_IIO_RING_BUFFER
void adis16260_remove_trigger(struct iio_dev *indio_dev); void adis16260_remove_trigger(struct iio_dev *indio_dev);
int adis16260_probe_trigger(struct iio_dev *indio_dev); int adis16260_probe_trigger(struct iio_dev *indio_dev);
......
...@@ -158,7 +158,6 @@ struct adis16400_state { ...@@ -158,7 +158,6 @@ struct adis16400_state {
int adis16400_set_irq(struct iio_dev *indio_dev, bool enable); int adis16400_set_irq(struct iio_dev *indio_dev, bool enable);
#ifdef CONFIG_IIO_RING_BUFFER
/* At the moment triggers are only used for ring buffer /* At the moment triggers are only used for ring buffer
* filling. This may change! * filling. This may change!
*/ */
...@@ -182,6 +181,7 @@ int adis16400_set_irq(struct iio_dev *indio_dev, bool enable); ...@@ -182,6 +181,7 @@ int adis16400_set_irq(struct iio_dev *indio_dev, bool enable);
#define ADIS16300_SCAN_INCLI_X 12 #define ADIS16300_SCAN_INCLI_X 12
#define ADIS16300_SCAN_INCLI_Y 13 #define ADIS16300_SCAN_INCLI_Y 13
#ifdef CONFIG_IIO_RING_BUFFER
void adis16400_remove_trigger(struct iio_dev *indio_dev); void adis16400_remove_trigger(struct iio_dev *indio_dev);
int adis16400_probe_trigger(struct iio_dev *indio_dev); int adis16400_probe_trigger(struct iio_dev *indio_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment