indio_dev->name = id->name;
indio_dev->dev.parent = &client->dev;
indio_dev->modes = INDIO_DIRECT_MODE;
- ret = iio_device_register(indio_dev);
+ ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
if (ret < 0) {
dev_err(chip->dev, "iio registration fails with error %d\n",
ret);
return 0;
}
-static int isl29028_remove(struct i2c_client *client)
-{
- struct iio_dev *indio_dev = i2c_get_clientdata(client);
-
- iio_device_unregister(indio_dev);
- return 0;
-}
-
static const struct i2c_device_id isl29028_id[] = {
{"isl29028", 0},
{}
.of_match_table = isl29028_of_match,
},
.probe = isl29028_probe,
- .remove = isl29028_remove,
.id_table = isl29028_id,
};
indio_dev->dev.parent = &clientp->dev;
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->name = chip->client->name;
- ret = iio_device_register(indio_dev);
+ ret = devm_iio_device_register(indio_dev->dev.parent, indio_dev);
if (ret) {
dev_err(&clientp->dev, "iio registration failed\n");
return ret;
#define TAOS_PM_OPS NULL
#endif
-static int taos_remove(struct i2c_client *client)
-{
- iio_device_unregister(i2c_get_clientdata(client));
-
- return 0;
-}
-
static struct i2c_device_id taos_idtable[] = {
{ "tsl2580", 0 },
{ "tsl2581", 1 },
},
.id_table = taos_idtable,
.probe = taos_probe,
- .remove = taos_remove,
};
module_i2c_driver(taos_driver);