mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-07-01 23:53:16 -04:00
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
This commit is contained in:
parent
1f366c6856
commit
6e12059463
1 changed files with 2 additions and 9 deletions
|
@ -88,16 +88,11 @@ static int __maybe_unused tidss_resume(struct device *dev)
|
||||||
return drm_mode_config_helper_resume(&tidss->ddev);
|
return drm_mode_config_helper_resume(&tidss->ddev);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PM
|
|
||||||
|
|
||||||
static const struct dev_pm_ops tidss_pm_ops = {
|
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_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 */
|
/* DRM device Information */
|
||||||
|
|
||||||
static void tidss_release(struct drm_device *ddev)
|
static void tidss_release(struct drm_device *ddev)
|
||||||
|
@ -250,9 +245,7 @@ static struct platform_driver tidss_platform_driver = {
|
||||||
.shutdown = tidss_shutdown,
|
.shutdown = tidss_shutdown,
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "tidss",
|
.name = "tidss",
|
||||||
#ifdef CONFIG_PM
|
.pm = pm_ptr(&tidss_pm_ops),
|
||||||
.pm = &tidss_pm_ops,
|
|
||||||
#endif
|
|
||||||
.of_match_table = tidss_of_table,
|
.of_match_table = tidss_of_table,
|
||||||
.suppress_bind_attrs = true,
|
.suppress_bind_attrs = true,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue