staging:iio:cdc:ad7150: Drop noisy print in probe
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 14 Mar 2021 18:14:55 +0000 (18:14 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 7 Apr 2021 07:36:36 +0000 (08:36 +0100)
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>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
Link: https://lore.kernel.org/r/20210314181511.531414-9-jic23@kernel.org
drivers/staging/iio/cdc/ad7150.c

index 34e6afe..8f8e472 100644 (file)
@@ -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[] = {