Skip to content

Commit 410d938

Browse files
geertuHans Verkuil
authored andcommitted
media: renesas: vsp1: Convert to SYSTEM_SLEEP/RUNTIME_PM_OPS()
Convert the Renesas VSP1 Video Processing Engine driver from SET_SYSTEM_SLEEP_PM_OPS() and SET_RUNTIME_PM_OPS() to SYSTEM_SLEEP_PM_OPS(), RUNTIME_PM_OPS(), and pm_ptr(). This lets us drop the __maybe_unused annotations from its various suspend and resume callbacks, and reduces kernel size in case CONFIG_PM is disabled. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Reviewed-by: Jacopo Mondi <[email protected]> Reviewed-by: Fabrizio Castro <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 2549f53 commit 410d938

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

drivers/media/platform/renesas/vsp1/vsp1_drv.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ void vsp1_device_put(struct vsp1_device *vsp1)
618618
* Power Management
619619
*/
620620

621-
static int __maybe_unused vsp1_pm_suspend(struct device *dev)
621+
static int vsp1_pm_suspend(struct device *dev)
622622
{
623623
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
624624

@@ -634,7 +634,7 @@ static int __maybe_unused vsp1_pm_suspend(struct device *dev)
634634
return 0;
635635
}
636636

637-
static int __maybe_unused vsp1_pm_resume(struct device *dev)
637+
static int vsp1_pm_resume(struct device *dev)
638638
{
639639
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
640640

@@ -650,7 +650,7 @@ static int __maybe_unused vsp1_pm_resume(struct device *dev)
650650
return 0;
651651
}
652652

653-
static int __maybe_unused vsp1_pm_runtime_suspend(struct device *dev)
653+
static int vsp1_pm_runtime_suspend(struct device *dev)
654654
{
655655
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
656656

@@ -660,7 +660,7 @@ static int __maybe_unused vsp1_pm_runtime_suspend(struct device *dev)
660660
return 0;
661661
}
662662

663-
static int __maybe_unused vsp1_pm_runtime_resume(struct device *dev)
663+
static int vsp1_pm_runtime_resume(struct device *dev)
664664
{
665665
struct vsp1_device *vsp1 = dev_get_drvdata(dev);
666666
int ret;
@@ -693,8 +693,8 @@ static int __maybe_unused vsp1_pm_runtime_resume(struct device *dev)
693693
}
694694

695695
static const struct dev_pm_ops vsp1_pm_ops = {
696-
SET_SYSTEM_SLEEP_PM_OPS(vsp1_pm_suspend, vsp1_pm_resume)
697-
SET_RUNTIME_PM_OPS(vsp1_pm_runtime_suspend, vsp1_pm_runtime_resume, NULL)
696+
SYSTEM_SLEEP_PM_OPS(vsp1_pm_suspend, vsp1_pm_resume)
697+
RUNTIME_PM_OPS(vsp1_pm_runtime_suspend, vsp1_pm_runtime_resume, NULL)
698698
};
699699

700700
/* -----------------------------------------------------------------------------
@@ -1042,7 +1042,7 @@ static struct platform_driver vsp1_platform_driver = {
10421042
.remove = vsp1_remove,
10431043
.driver = {
10441044
.name = "vsp1",
1045-
.pm = &vsp1_pm_ops,
1045+
.pm = pm_ptr(&vsp1_pm_ops),
10461046
.of_match_table = vsp1_of_match,
10471047
},
10481048
};

0 commit comments

Comments
 (0)