@@ -323,8 +323,7 @@ detect_analog:
out:
- pm_runtime_mark_last_busy(connector->dev->dev);
- pm_runtime_put_autosuspend(connector->dev->dev);
+ pm_runtime_last_busy_and_autosuspend(connector->dev->dev);
return conn_status;
}
@@ -766,8 +766,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
mutex_unlock(&drm->client.mutex);
out_suspend:
- pm_runtime_mark_last_busy(dev->dev);
- pm_runtime_put_autosuspend(dev->dev);
+ pm_runtime_last_busy_and_autosuspend(dev->dev);
return ret;
}
@@ -794,8 +793,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
{
struct nouveau_cli *cli = nouveau_cli(fpriv);
nouveau_cli_destroy(cli);
- pm_runtime_mark_last_busy(dev->dev);
- pm_runtime_put_autosuspend(dev->dev);
+ pm_runtime_last_busy_and_autosuspend(dev->dev);
}
static const struct drm_ioctl_desc
@@ -834,8 +832,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
break;
}
- pm_runtime_mark_last_busy(dev->dev);
- pm_runtime_put_autosuspend(dev->dev);
+ pm_runtime_last_busy_and_autosuspend(dev->dev);
return ret;
}
Use the new pm_runtime_last_busy_and_autosuspend helper instead of open coding the same code Signed-off-by: Vinod Koul <vinod.koul@intel.com> --- drivers/gpu/drm/nouveau/nouveau_connector.c | 3 +-- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +++------ 2 files changed, 4 insertions(+), 8 deletions(-)