On 6/15/22 16:51, Shreeya Patel wrote: > +static int ltrf216a_remove(struct i2c_client *client) > +{ > + struct iio_dev *indio_dev = i2c_get_clientdata(client); > + > + iio_device_unregister(indio_dev); > + pm_runtime_disable(&client->dev); > + pm_runtime_set_suspended(&client->dev); > + ltrf216a_disable(indio_dev); > + > + return 0; > +} As Jonathan said, there is no need to disable sensor in the remove() since you're using devm_add_action_or_reset(). If you're going to use devm_pm_runtime_enable(), then let's also use devm_iio_device_register() and in this case the ltrf216a_remove() is not needed anymore at all since the removal will be handled by the driver core entirely, i.e. you'll need to drop ltrf216a_remove(). -- Best regards, Dmitry