staging:iio:pollfunc: Make explicit that private data is always pointer to a struct iio_dev.
This is always true, so lets make it explicit. Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
9c0c22bd16
commit
e65bc6ac6f
|
@ -59,7 +59,7 @@ static int adis16201_read_ring_data(struct iio_dev *indio_dev, u8 *rx)
|
|||
static irqreturn_t adis16201_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adis16201_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ static int adis16203_read_ring_data(struct device *dev, u8 *rx)
|
|||
static irqreturn_t adis16203_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adis16203_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ static int adis16204_read_ring_data(struct device *dev, u8 *rx)
|
|||
static irqreturn_t adis16204_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adis16204_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
int i = 0;
|
||||
|
|
|
@ -57,7 +57,7 @@ static int adis16209_read_ring_data(struct device *dev, u8 *rx)
|
|||
static irqreturn_t adis16209_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adis16209_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ static int adis16240_read_ring_data(struct device *dev, u8 *rx)
|
|||
static irqreturn_t adis16240_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adis16240_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ static int lis3l02dq_get_ring_element(struct iio_dev *indio_dev,
|
|||
static irqreturn_t lis3l02dq_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
int len = 0;
|
||||
size_t datasize = ring->access->get_bytes_per_datum(ring);
|
||||
|
|
|
@ -537,7 +537,7 @@ static int ad7192_ring_postdisable(struct iio_dev *indio_dev)
|
|||
static irqreturn_t ad7192_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
struct ad7192_state *st = iio_priv(indio_dev);
|
||||
s64 dat64[2];
|
||||
|
|
|
@ -117,7 +117,7 @@ static int ad7298_ring_preenable(struct iio_dev *indio_dev)
|
|||
static irqreturn_t ad7298_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct ad7298_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
s64 time_ns;
|
||||
|
|
|
@ -76,7 +76,7 @@ static int ad7476_ring_preenable(struct iio_dev *indio_dev)
|
|||
static irqreturn_t ad7476_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct ad7476_state *st = iio_priv(indio_dev);
|
||||
s64 time_ns;
|
||||
__u8 *rxbuf;
|
||||
|
|
|
@ -80,8 +80,7 @@ static int ad7606_ring_preenable(struct iio_dev *indio_dev)
|
|||
static irqreturn_t ad7606_trigger_handler_th_bh(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct ad7606_state *st = iio_priv(indio_dev);
|
||||
struct ad7606_state *st = iio_priv(pf->indio_dev);
|
||||
|
||||
gpio_set_value(st->pdata->gpio_convst, 1);
|
||||
|
||||
|
|
|
@ -401,7 +401,7 @@ static int ad7793_ring_postdisable(struct iio_dev *indio_dev)
|
|||
static irqreturn_t ad7793_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
struct ad7793_state *st = iio_priv(indio_dev);
|
||||
s64 dat64[2];
|
||||
|
|
|
@ -112,7 +112,7 @@ static int ad7887_ring_postdisable(struct iio_dev *indio_dev)
|
|||
static irqreturn_t ad7887_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct ad7887_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
s64 time_ns;
|
||||
|
|
|
@ -105,7 +105,7 @@ static int ad799x_ring_preenable(struct iio_dev *indio_dev)
|
|||
static irqreturn_t ad799x_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct ad799x_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
s64 time_ns;
|
||||
|
|
|
@ -104,7 +104,7 @@ static int max1363_ring_preenable(struct iio_dev *indio_dev)
|
|||
static irqreturn_t max1363_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct max1363_state *st = iio_priv(indio_dev);
|
||||
s64 time_ns;
|
||||
__u8 *rxbuf;
|
||||
|
|
|
@ -60,7 +60,7 @@ static int adis16260_read_ring_data(struct device *dev, u8 *rx)
|
|||
static irqreturn_t adis16260_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adis16260_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
int i = 0;
|
||||
|
|
|
@ -111,7 +111,7 @@ static int adis16350_spi_read_all(struct device *dev, u8 *rx)
|
|||
static irqreturn_t adis16400_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct adis16400_state *st = iio_priv(indio_dev);
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
int i = 0, j, ret = 0;
|
||||
|
|
|
@ -274,7 +274,7 @@ struct iio_poll_func
|
|||
*iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p),
|
||||
irqreturn_t (*thread)(int irq, void *p),
|
||||
int type,
|
||||
void *private,
|
||||
struct iio_dev *indio_dev,
|
||||
const char *fmt,
|
||||
...)
|
||||
{
|
||||
|
@ -294,7 +294,7 @@ struct iio_poll_func
|
|||
pf->h = h;
|
||||
pf->thread = thread;
|
||||
pf->type = type;
|
||||
pf->private_data = private;
|
||||
pf->indio_dev = indio_dev;
|
||||
|
||||
return pf;
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ out:
|
|||
static irqreturn_t ade7758_trigger_handler(int irq, void *p)
|
||||
{
|
||||
struct iio_poll_func *pf = p;
|
||||
struct iio_dev *indio_dev = pf->private_data;
|
||||
struct iio_dev *indio_dev = pf->indio_dev;
|
||||
struct iio_ring_buffer *ring = indio_dev->ring;
|
||||
struct ade7758_state *st = iio_priv(indio_dev);
|
||||
s64 dat64[2];
|
||||
|
|
|
@ -76,7 +76,7 @@ struct iio_trigger {
|
|||
/**
|
||||
* struct iio_poll_func - poll function pair
|
||||
*
|
||||
* @private_data: data specific to device (passed into poll func)
|
||||
* @indio_dev: data specific to device (passed into poll func)
|
||||
* @h: the function that is actually run on trigger
|
||||
* @thread: threaded interrupt part
|
||||
* @type: the type of interrupt (basically if oneshot)
|
||||
|
@ -88,7 +88,7 @@ struct iio_trigger {
|
|||
* passes it via here.
|
||||
**/
|
||||
struct iio_poll_func {
|
||||
void *private_data;
|
||||
struct iio_dev *indio_dev;
|
||||
irqreturn_t (*h)(int irq, void *p);
|
||||
irqreturn_t (*thread)(int irq, void *p);
|
||||
int type;
|
||||
|
@ -180,7 +180,7 @@ struct iio_poll_func
|
|||
*iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p),
|
||||
irqreturn_t (*thread)(int irq, void *p),
|
||||
int type,
|
||||
void *private,
|
||||
struct iio_dev *indio_dev,
|
||||
const char *fmt,
|
||||
...);
|
||||
void iio_dealloc_pollfunc(struct iio_poll_func *pf);
|
||||
|
|
Loading…
Reference in New Issue