Skip to content

Commit 2549f53

Browse files
geertuHans Verkuil
authored andcommitted
media: renesas: ceu: Convert to RUNTIME_PM_OPS()
Convert the Renesas Capture Engine Unit driver from SET_RUNTIME_PM_OPS() to RUNTIME_PM_OPS() and pm_ptr(). This lets us drop the __maybe_unused annotations from its runtime suspend and resume callbacks, and reduces kernel size in case CONFIG_PM is disabled. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Fabrizio Castro <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent 2ca1d2a commit 2549f53

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/media/platform/renesas/renesas-ceu.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,7 +1048,7 @@ static int ceu_init_mbus_fmt(struct ceu_device *ceudev)
10481048
/*
10491049
* ceu_runtime_resume() - soft-reset the interface and turn sensor power on.
10501050
*/
1051-
static int __maybe_unused ceu_runtime_resume(struct device *dev)
1051+
static int ceu_runtime_resume(struct device *dev)
10521052
{
10531053
struct ceu_device *ceudev = dev_get_drvdata(dev);
10541054
struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
@@ -1064,7 +1064,7 @@ static int __maybe_unused ceu_runtime_resume(struct device *dev)
10641064
* ceu_runtime_suspend() - disable capture and interrupts and soft-reset.
10651065
* Turn sensor power off.
10661066
*/
1067-
static int __maybe_unused ceu_runtime_suspend(struct device *dev)
1067+
static int ceu_runtime_suspend(struct device *dev)
10681068
{
10691069
struct ceu_device *ceudev = dev_get_drvdata(dev);
10701070
struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
@@ -1709,15 +1709,13 @@ static void ceu_remove(struct platform_device *pdev)
17091709
}
17101710

17111711
static const struct dev_pm_ops ceu_pm_ops = {
1712-
SET_RUNTIME_PM_OPS(ceu_runtime_suspend,
1713-
ceu_runtime_resume,
1714-
NULL)
1712+
RUNTIME_PM_OPS(ceu_runtime_suspend, ceu_runtime_resume, NULL)
17151713
};
17161714

17171715
static struct platform_driver ceu_driver = {
17181716
.driver = {
17191717
.name = DRIVER_NAME,
1720-
.pm = &ceu_pm_ops,
1718+
.pm = pm_ptr(&ceu_pm_ops),
17211719
.of_match_table = of_match_ptr(ceu_of_match),
17221720
},
17231721
.probe = ceu_probe,

0 commit comments

Comments
 (0)