linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iio:max1361: Use default triggered buffer setup ops
@ 2013-09-16  8:34 Lars-Peter Clausen
  2013-09-16 21:38 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Lars-Peter Clausen @ 2013-09-16  8:34 UTC (permalink / raw)
  To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen

The max1361 driver uses the same callbacks as the triggered buffer default
buffer setup ops, so just remove the max1361 specific ops and let it use the
default ops.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 drivers/iio/adc/max1363.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
index 4fb35d1..1e7160d 100644
--- a/drivers/iio/adc/max1363.c
+++ b/drivers/iio/adc/max1363.c
@@ -1484,12 +1484,6 @@ done:
 	return IRQ_HANDLED;
 }
 
-static const struct iio_buffer_setup_ops max1363_buffered_setup_ops = {
-	.postenable = &iio_triggered_buffer_postenable,
-	.preenable = &iio_sw_buffer_preenable,
-	.predisable = &iio_triggered_buffer_predisable,
-};
-
 static int max1363_probe(struct i2c_client *client,
 			 const struct i2c_device_id *id)
 {
@@ -1559,7 +1553,7 @@ static int max1363_probe(struct i2c_client *client,
 		goto error_disable_reg;
 
 	ret = iio_triggered_buffer_setup(indio_dev, NULL,
-		&max1363_trigger_handler, &max1363_buffered_setup_ops);
+		&max1363_trigger_handler, NULL);
 	if (ret)
 		goto error_disable_reg;
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] iio:max1361: Use default triggered buffer setup ops
  2013-09-16  8:34 [PATCH] iio:max1361: Use default triggered buffer setup ops Lars-Peter Clausen
@ 2013-09-16 21:38 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2013-09-16 21:38 UTC (permalink / raw)
  To: Lars-Peter Clausen; +Cc: linux-iio

On 09/16/13 09:34, Lars-Peter Clausen wrote:
> The max1361 driver uses the same callbacks as the triggered buffer default
> buffer setup ops, so just remove the max1361 specific ops and let it use the
> default ops.
> 
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Thanks. Applied to the togreg branch of ii
> ---
>  drivers/iio/adc/max1363.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
> index 4fb35d1..1e7160d 100644
> --- a/drivers/iio/adc/max1363.c
> +++ b/drivers/iio/adc/max1363.c
> @@ -1484,12 +1484,6 @@ done:
>  	return IRQ_HANDLED;
>  }
>  
> -static const struct iio_buffer_setup_ops max1363_buffered_setup_ops = {
> -	.postenable = &iio_triggered_buffer_postenable,
> -	.preenable = &iio_sw_buffer_preenable,
> -	.predisable = &iio_triggered_buffer_predisable,
> -};
> -
>  static int max1363_probe(struct i2c_client *client,
>  			 const struct i2c_device_id *id)
>  {
> @@ -1559,7 +1553,7 @@ static int max1363_probe(struct i2c_client *client,
>  		goto error_disable_reg;
>  
>  	ret = iio_triggered_buffer_setup(indio_dev, NULL,
> -		&max1363_trigger_handler, &max1363_buffered_setup_ops);
> +		&max1363_trigger_handler, NULL);
>  	if (ret)
>  		goto error_disable_reg;
>  
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-16 20:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-16  8:34 [PATCH] iio:max1361: Use default triggered buffer setup ops Lars-Peter Clausen
2013-09-16 21:38 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).