diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2011-06-27 13:07:50 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 14:39:49 -0700 |
commit | 937a9601211100269fdc8125017809976ec9b37f (patch) | |
tree | 2ae6f16de120384b5b0d7e966324239ec6121460 /drivers/staging/iio/meter/ade7854.h | |
parent | 57157d1c0e73662401e0d32f501e54f2d80f4740 (diff) | |
download | linux-937a9601211100269fdc8125017809976ec9b37f.tar.bz2 |
staging:iio:meter:ade7854: Allocate buffers in state and state with iio_dev.
Requires moving a few things around, but should be no functional changes.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/meter/ade7854.h')
-rw-r--r-- | drivers/staging/iio/meter/ade7854.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/staging/iio/meter/ade7854.h b/drivers/staging/iio/meter/ade7854.h index 79a21109f4e2..2c96e8695d57 100644 --- a/drivers/staging/iio/meter/ade7854.h +++ b/drivers/staging/iio/meter/ade7854.h @@ -148,29 +148,29 @@ * struct ade7854_state - device instance specific data * @spi: actual spi_device * @indio_dev: industrial I/O device structure + * @buf_lock: mutex to protect tx and rx * @tx: transmit buffer * @rx: receive buffer - * @buf_lock: mutex to protect tx and rx **/ struct ade7854_state { - struct spi_device *spi; - struct i2c_client *i2c; - struct iio_dev *indio_dev; - u8 *tx; - u8 *rx; - int (*read_reg_8) (struct device *, u16, u8 *); - int (*read_reg_16) (struct device *, u16, u16 *); - int (*read_reg_24) (struct device *, u16, u32 *); - int (*read_reg_32) (struct device *, u16, u32 *); - int (*write_reg_8) (struct device *, u16, u8); - int (*write_reg_16) (struct device *, u16, u16); - int (*write_reg_24) (struct device *, u16, u32); - int (*write_reg_32) (struct device *, u16, u32); - int irq; - struct mutex buf_lock; + struct spi_device *spi; + struct i2c_client *i2c; + int (*read_reg_8) (struct device *, u16, u8 *); + int (*read_reg_16) (struct device *, u16, u16 *); + int (*read_reg_24) (struct device *, u16, u32 *); + int (*read_reg_32) (struct device *, u16, u32 *); + int (*write_reg_8) (struct device *, u16, u8); + int (*write_reg_16) (struct device *, u16, u16); + int (*write_reg_24) (struct device *, u16, u32); + int (*write_reg_32) (struct device *, u16, u32); + int irq; + struct mutex buf_lock; + u8 tx[ADE7854_MAX_TX] ____cacheline_aligned; + u8 rx[ADE7854_MAX_RX]; + }; -extern int ade7854_probe(struct ade7854_state *st, struct device *dev); -extern int ade7854_remove(struct ade7854_state *st); +extern int ade7854_probe(struct iio_dev *indio_dev, struct device *dev); +extern int ade7854_remove(struct iio_dev *indio_dev); #endif |