diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-07 11:35:26 +0800 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2021-11-10 13:51:26 +0200 |
commit | 6e120594631fdcfd83e5e0a1351730dae46d9d24 (patch) | |
tree | be8180ed1860f54b2e902c00229cee5b517ffce8 /drivers/gpu/drm/tidss | |
parent | 1f366c6856e942f61d4ecef709ac952c8dc58d23 (diff) | |
download | linux-stable-6e120594631fdcfd83e5e0a1351730dae46d9d24.tar.gz linux-stable-6e120594631fdcfd83e5e0a1351730dae46d9d24.tar.bz2 linux-stable-6e120594631fdcfd83e5e0a1351730dae46d9d24.zip |
drm/tidss: Make use of the helper macro SET_RUNTIME_PM_OPS()
Use the helper macro SET_RUNTIME_PM_OPS() instead of the verbose
operators ".runtime_suspend/.runtime_resume", because the
SET_RUNTIME_PM_OPS() is a nice helper macro that could be brought
in to make code a little more concise.
Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210907033526.1612-1-caihuoqing@baidu.com
Diffstat (limited to 'drivers/gpu/drm/tidss')
-rw-r--r-- | drivers/gpu/drm/tidss/tidss_drv.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c index d620f35688da..4366b5c798e0 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -88,16 +88,11 @@ static int __maybe_unused tidss_resume(struct device *dev) return drm_mode_config_helper_resume(&tidss->ddev); } -#ifdef CONFIG_PM - static const struct dev_pm_ops tidss_pm_ops = { - .runtime_suspend = tidss_pm_runtime_suspend, - .runtime_resume = tidss_pm_runtime_resume, SET_SYSTEM_SLEEP_PM_OPS(tidss_suspend, tidss_resume) + SET_RUNTIME_PM_OPS(tidss_pm_runtime_suspend, tidss_pm_runtime_resume, NULL) }; -#endif /* CONFIG_PM */ - /* DRM device Information */ static void tidss_release(struct drm_device *ddev) @@ -250,9 +245,7 @@ static struct platform_driver tidss_platform_driver = { .shutdown = tidss_shutdown, .driver = { .name = "tidss", -#ifdef CONFIG_PM - .pm = &tidss_pm_ops, -#endif + .pm = pm_ptr(&tidss_pm_ops), .of_match_table = tidss_of_table, .suppress_bind_attrs = true, }, |