Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: light: veml6070: use device managed iio_device_register

Simplify the code by using devm_iio_device_register(), which removes the
need for a 'remove' function, as there are no more actions to take.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20240929-veml6070-cleanup-v1-3-a9350341a646@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Javier Carrasco and committed by
Jonathan Cameron
d92fcd7e fc385251

+1 -10
+1 -10
drivers/iio/light/veml6070.c
··· 179 179 if (ret < 0) 180 180 return ret; 181 181 182 - return iio_device_register(indio_dev); 183 - } 184 - 185 - static void veml6070_remove(struct i2c_client *client) 186 - { 187 - struct iio_dev *indio_dev = i2c_get_clientdata(client); 188 - struct veml6070_data *data = iio_priv(indio_dev); 189 - 190 - iio_device_unregister(indio_dev); 182 + return devm_iio_device_register(&client->dev, indio_dev); 191 183 } 192 184 193 185 static const struct i2c_device_id veml6070_id[] = { ··· 193 201 .name = VEML6070_DRV_NAME, 194 202 }, 195 203 .probe = veml6070_probe, 196 - .remove = veml6070_remove, 197 204 .id_table = veml6070_id, 198 205 }; 199 206