diff mbox series

[08/24] staging:iio:cdc:ad7150: Drop noisy print in probe

Message ID 20210207154623.433442-9-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>

Also
* drop i2c_set_client_data() as now unused.
* white space cleanups

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

Comments

Song Bao Hua (Barry Song) Feb. 8, 2021, 8:02 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 08/24] staging:iio:cdc:ad7150: Drop noisy print in probe
> 
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Also
> * drop i2c_set_client_data() as now unused.
> * white space cleanups
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Reviewed-by: Barry Song <song.bao.hua@hisilicon.com>

> ---
>  drivers/staging/iio/cdc/ad7150.c | 13 ++-----------
>  1 file changed, 2 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/staging/iio/cdc/ad7150.c
> b/drivers/staging/iio/cdc/ad7150.c
> index 34e6afe52f0e..8f8e472e3240 100644
> --- a/drivers/staging/iio/cdc/ad7150.c
> +++ b/drivers/staging/iio/cdc/ad7150.c
> @@ -573,11 +573,9 @@ static int ad7150_probe(struct i2c_client *client,
>  	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));
>  	if (!indio_dev)
>  		return -ENOMEM;
> +
>  	chip = iio_priv(indio_dev);
>  	mutex_init(&chip->state_lock);
> -	/* this is only used for device removal purposes */
> -	i2c_set_clientdata(client, indio_dev);
> -
>  	chip->client = client;
> 
>  	indio_dev->name = id->name;
> @@ -624,14 +622,7 @@ static int ad7150_probe(struct i2c_client *client,
>  		}
>  	}
> 
> -	ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
> -	if (ret)
> -		return ret;
> -
> -	dev_info(&client->dev, "%s capacitive sensor registered,irq: %d\n",
> -		 id->name, client->irq);
> -
> -	return 0;
> +	return devm_iio_device_register(indio_dev->dev.parent, indio_dev);
>  }
> 
>  static const struct i2c_device_id ad7150_id[] = {
> --
> 2.30.0
diff mbox series

Patch

diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index 34e6afe52f0e..8f8e472e3240 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -573,11 +573,9 @@  static int ad7150_probe(struct i2c_client *client,
 	indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*chip));
 	if (!indio_dev)
 		return -ENOMEM;
+
 	chip = iio_priv(indio_dev);
 	mutex_init(&chip->state_lock);
-	/* this is only used for device removal purposes */
-	i2c_set_clientdata(client, indio_dev);
-
 	chip->client = client;
 
 	indio_dev->name = id->name;
@@ -624,14 +622,7 @@  static int ad7150_probe(struct i2c_client *client,
 		}
 	}
 
-	ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
-	if (ret)
-		return ret;
-
-	dev_info(&client->dev, "%s capacitive sensor registered,irq: %d\n",
-		 id->name, client->irq);
-
-	return 0;
+	return devm_iio_device_register(indio_dev->dev.parent, indio_dev);
 }
 
 static const struct i2c_device_id ad7150_id[] = {