Merge tag 'riscv-for-linus-5.14-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-microblaze.git] / drivers / iio / light / isl29028.c
index 2f8b494..9de3262 100644 (file)
@@ -339,9 +339,7 @@ static int isl29028_set_pm_runtime_busy(struct isl29028_chip *chip, bool on)
        int ret;
 
        if (on) {
-               ret = pm_runtime_get_sync(dev);
-               if (ret < 0)
-                       pm_runtime_put_noidle(dev);
+               ret = pm_runtime_resume_and_get(dev);
        } else {
                pm_runtime_mark_last_busy(dev);
                ret = pm_runtime_put_autosuspend(dev);
@@ -647,7 +645,6 @@ static int isl29028_remove(struct i2c_client *client)
 
        pm_runtime_disable(&client->dev);
        pm_runtime_set_suspended(&client->dev);
-       pm_runtime_put_noidle(&client->dev);
 
        return isl29028_clear_configure_reg(chip);
 }