aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/iio/accel/lis3l02dq.h
diff options
context:
space:
mode:
authorJonathan Cameron <jic23@cam.ac.uk>2011-05-18 09:42:26 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-19 19:15:03 -0400
commit7b2fdd192fede94d88e2e31826031e759f30908e (patch)
treed3209ba2dd66f87d1e4e0c1244a17212c6bd091e /drivers/staging/iio/accel/lis3l02dq.h
parentcc4a48e4cf92776656633aeb895520dc53893f32 (diff)
staging:iio: Rip out helper for software rings.
It seemed like a good idea at the time, it wasn't. The code with this in place is larger and more complex for no real gain. Basically we've cleaned up the core around it so much that this no longer makes sense. Only really effects the lis3l02dq driver. Signed-off-by: Jonathan Cameron <jic23@cam.acuk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/accel/lis3l02dq.h')
-rw-r--r--drivers/staging/iio/accel/lis3l02dq.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/staging/iio/accel/lis3l02dq.h b/drivers/staging/iio/accel/lis3l02dq.h
index 43277d1dd9a..94d98695995 100644
--- a/drivers/staging/iio/accel/lis3l02dq.h
+++ b/drivers/staging/iio/accel/lis3l02dq.h
@@ -148,7 +148,6 @@ Form of high byte dependent on justification set in ctrl reg */
148#define LIS3L02DQ_MAX_RX 12 148#define LIS3L02DQ_MAX_RX 12
149/** 149/**
150 * struct lis3l02dq_state - device instance specific data 150 * struct lis3l02dq_state - device instance specific data
151 * @helper: data and func pointer allowing generic functions
152 * @us: actual spi_device 151 * @us: actual spi_device
153 * @trig: data ready trigger registered with iio 152 * @trig: data ready trigger registered with iio
154 * @tx: transmit buffer 153 * @tx: transmit buffer
@@ -156,17 +155,14 @@ Form of high byte dependent on justification set in ctrl reg */
156 * @buf_lock: mutex to protect tx and rx 155 * @buf_lock: mutex to protect tx and rx
157 **/ 156 **/
158struct lis3l02dq_state { 157struct lis3l02dq_state {
159 struct iio_sw_ring_helper_state help;
160 struct spi_device *us; 158 struct spi_device *us;
161 struct iio_trigger *trig; 159 struct iio_trigger *trig;
162 u8 *tx;
163 u8 *rx;
164 struct mutex buf_lock; 160 struct mutex buf_lock;
165 bool trigger_on; 161 bool trigger_on;
166};
167 162
168#define lis3l02dq_h_to_s(_h) \ 163 u8 tx[LIS3L02DQ_MAX_RX] ____cacheline_aligned;
169 container_of(_h, struct lis3l02dq_state, help) 164 u8 rx[LIS3L02DQ_MAX_RX] ____cacheline_aligned;
165};
170 166
171int lis3l02dq_spi_read_reg_8(struct iio_dev *indio_dev, 167int lis3l02dq_spi_read_reg_8(struct iio_dev *indio_dev,
172 u8 reg_address, 168 u8 reg_address,