Skip to content

Commit 2ca1d2a

Browse files
geertuHans Verkuil
authored andcommitted
media: renesas: fdp1: Convert to RUNTIME_PM_OPS()
Convert the Renesas Fine Display Processor 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 cde682d commit 2ca1d2a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

drivers/media/platform/renesas/rcar_fdp1.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2408,7 +2408,7 @@ static void fdp1_remove(struct platform_device *pdev)
24082408
rcar_fcp_put(fdp1->fcp);
24092409
}
24102410

2411-
static int __maybe_unused fdp1_pm_runtime_suspend(struct device *dev)
2411+
static int fdp1_pm_runtime_suspend(struct device *dev)
24122412
{
24132413
struct fdp1_dev *fdp1 = dev_get_drvdata(dev);
24142414

@@ -2417,7 +2417,7 @@ static int __maybe_unused fdp1_pm_runtime_suspend(struct device *dev)
24172417
return 0;
24182418
}
24192419

2420-
static int __maybe_unused fdp1_pm_runtime_resume(struct device *dev)
2420+
static int fdp1_pm_runtime_resume(struct device *dev)
24212421
{
24222422
struct fdp1_dev *fdp1 = dev_get_drvdata(dev);
24232423

@@ -2428,9 +2428,7 @@ static int __maybe_unused fdp1_pm_runtime_resume(struct device *dev)
24282428
}
24292429

24302430
static const struct dev_pm_ops fdp1_pm_ops = {
2431-
SET_RUNTIME_PM_OPS(fdp1_pm_runtime_suspend,
2432-
fdp1_pm_runtime_resume,
2433-
NULL)
2431+
RUNTIME_PM_OPS(fdp1_pm_runtime_suspend, fdp1_pm_runtime_resume, NULL)
24342432
};
24352433

24362434
static const struct of_device_id fdp1_dt_ids[] = {
@@ -2445,7 +2443,7 @@ static struct platform_driver fdp1_pdrv = {
24452443
.driver = {
24462444
.name = DRIVER_NAME,
24472445
.of_match_table = fdp1_dt_ids,
2448-
.pm = &fdp1_pm_ops,
2446+
.pm = pm_ptr(&fdp1_pm_ops),
24492447
},
24502448
};
24512449

0 commit comments

Comments
 (0)