Skip to content

Commit

Permalink
staging:iio:accel:adis16204 move to chan_spec based setup.
Browse files Browse the repository at this point in the history
For clean drivers its easier to convert to chan_spec based
registration than to work around the scan_el attributes
going away.

Some minor cleanups done whilst here.

Untested.

V2: used IIO_CHAN macro

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jonathan Cameron authored and Greg Kroah-Hartman committed May 19, 2011
1 parent d37b24b commit ad3eb9a
Show file tree
Hide file tree
Showing 4 changed files with 220 additions and 259 deletions.
13 changes: 1 addition & 12 deletions drivers/staging/iio/accel/adis16204.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ struct adis16204_state {
struct mutex buf_lock;
};

int adis16204_set_irq(struct device *dev, bool enable);
int adis16204_set_irq(struct iio_dev *indio_dev, bool enable);

#ifdef CONFIG_IIO_RING_BUFFER
enum adis16204_scan {
Expand All @@ -103,8 +103,6 @@ ssize_t adis16204_read_data_from_ring(struct device *dev,
int adis16204_configure_ring(struct iio_dev *indio_dev);
void adis16204_unconfigure_ring(struct iio_dev *indio_dev);

int adis16204_initialize_ring(struct iio_ring_buffer *ring);
void adis16204_uninitialize_ring(struct iio_ring_buffer *ring);
#else /* CONFIG_IIO_RING_BUFFER */

static inline void adis16204_remove_trigger(struct iio_dev *indio_dev)
Expand Down Expand Up @@ -133,14 +131,5 @@ static inline void adis16204_unconfigure_ring(struct iio_dev *indio_dev)
{
}

static inline int adis16204_initialize_ring(struct iio_ring_buffer *ring)
{
return 0;
}

static inline void adis16204_uninitialize_ring(struct iio_ring_buffer *ring)
{
}

#endif /* CONFIG_IIO_RING_BUFFER */
#endif /* SPI_ADIS16204_H_ */
Loading

0 comments on commit ad3eb9a

Please sign in to comment.