diff mbox series

[05/24] staging:iio:cdc:ad7150: Drop platform data support

Message ID 20210207154623.433442-6-jic23@kernel.org (mailing list archive)
State New, archived
Headers show
Series staging:iio:cdc:ad7150: cleanup / fixup / graduate | expand

Commit Message

Jonathan Cameron Feb. 7, 2021, 3:46 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

There are no mainline board files using this driver so lets drop
the platform_data support in favour of devicetree and similar.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/staging/iio/cdc/ad7150.c | 14 --------------
 1 file changed, 14 deletions(-)

Comments

Song Bao Hua (Barry Song) Feb. 8, 2021, 8:01 a.m. UTC | #1
> -----Original Message-----
> From: Jonathan Cameron [mailto:jic23@kernel.org]
> Sent: Monday, February 8, 2021 4:46 AM
> To: linux-iio@vger.kernel.org
> Cc: Lars-Peter Clausen <lars@metafoo.de>; Michael Hennerich
> <Michael.Hennerich@analog.com>; Song Bao Hua (Barry Song)
> <song.bao.hua@hisilicon.com>; robh+dt@kernel.org; Jonathan Cameron
> <jonathan.cameron@huawei.com>
> Subject: [PATCH 05/24] staging:iio:cdc:ad7150: Drop platform data support
> 
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> There are no mainline board files using this driver so lets drop
> the platform_data support in favour of devicetree and similar.
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/staging/iio/cdc/ad7150.c | 14 --------------
>  1 file changed, 14 deletions(-)
> 
> diff --git a/drivers/staging/iio/cdc/ad7150.c
> b/drivers/staging/iio/cdc/ad7150.c
> index 0dce1b8ce76d..7ad9105e6b46 100644
> --- a/drivers/staging/iio/cdc/ad7150.c
> +++ b/drivers/staging/iio/cdc/ad7150.c
> @@ -570,20 +570,6 @@ static int ad7150_probe(struct i2c_client *client,
>  			return ret;
>  	}
> 
> -	if (client->dev.platform_data) {
> -		ret = devm_request_threaded_irq(&client->dev, *(unsigned int *)
> -						client->dev.platform_data,
> -						NULL,
> -						&ad7150_event_handler,
> -						IRQF_TRIGGER_RISING |
> -						IRQF_TRIGGER_FALLING |
> -						IRQF_ONESHOT,
> -						"ad7150_irq2",
> -						indio_dev);
> -		if (ret)
> -			return ret;
> -	}
> -

The original code looks ugly, I forget when ad7150 needs
the second interrupt.

>  	ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
>  	if (ret)
>  		return ret;
> --
> 2.30.0

Thanks
Barry
Jonathan Cameron Feb. 8, 2021, 11:12 a.m. UTC | #2
On Mon, 8 Feb 2021 08:01:10 +0000
"Song Bao Hua (Barry Song)" <song.bao.hua@hisilicon.com> wrote:

> > -----Original Message-----
> > From: Jonathan Cameron [mailto:jic23@kernel.org]
> > Sent: Monday, February 8, 2021 4:46 AM
> > To: linux-iio@vger.kernel.org
> > Cc: Lars-Peter Clausen <lars@metafoo.de>; Michael Hennerich
> > <Michael.Hennerich@analog.com>; Song Bao Hua (Barry Song)
> > <song.bao.hua@hisilicon.com>; robh+dt@kernel.org; Jonathan Cameron
> > <jonathan.cameron@huawei.com>
> > Subject: [PATCH 05/24] staging:iio:cdc:ad7150: Drop platform data support
> > 
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > 
> > There are no mainline board files using this driver so lets drop
> > the platform_data support in favour of devicetree and similar.
> > 
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> > ---
> >  drivers/staging/iio/cdc/ad7150.c | 14 --------------
> >  1 file changed, 14 deletions(-)
> > 
> > diff --git a/drivers/staging/iio/cdc/ad7150.c
> > b/drivers/staging/iio/cdc/ad7150.c
> > index 0dce1b8ce76d..7ad9105e6b46 100644
> > --- a/drivers/staging/iio/cdc/ad7150.c
> > +++ b/drivers/staging/iio/cdc/ad7150.c
> > @@ -570,20 +570,6 @@ static int ad7150_probe(struct i2c_client *client,
> >  			return ret;
> >  	}
> > 
> > -	if (client->dev.platform_data) {
> > -		ret = devm_request_threaded_irq(&client->dev, *(unsigned int *)
> > -						client->dev.platform_data,
> > -						NULL,
> > -						&ad7150_event_handler,
> > -						IRQF_TRIGGER_RISING |
> > -						IRQF_TRIGGER_FALLING |
> > -						IRQF_ONESHOT,
> > -						"ad7150_irq2",
> > -						indio_dev);
> > -		if (ret)
> > -			return ret;
> > -	}
> > -  
> 
> The original code looks ugly, I forget when ad7150 needs
> the second interrupt.
It is one per channel.  That is events on a channel are only indicated on the
line associated with the channel.

I bring it back later in the series.

Jonathan

> 
> >  	ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
> >  	if (ret)
> >  		return ret;
> > --
> > 2.30.0  
> 
> Thanks
> Barry
>
diff mbox series

Patch

diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index 0dce1b8ce76d..7ad9105e6b46 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -570,20 +570,6 @@  static int ad7150_probe(struct i2c_client *client,
 			return ret;
 	}
 
-	if (client->dev.platform_data) {
-		ret = devm_request_threaded_irq(&client->dev, *(unsigned int *)
-						client->dev.platform_data,
-						NULL,
-						&ad7150_event_handler,
-						IRQF_TRIGGER_RISING |
-						IRQF_TRIGGER_FALLING |
-						IRQF_ONESHOT,
-						"ad7150_irq2",
-						indio_dev);
-		if (ret)
-			return ret;
-	}
-
 	ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
 	if (ret)
 		return ret;