Skip to content

Commit cde682d

Browse files
geertuHans Verkuil
authored andcommitted
media: renesas: rcar-vin: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the Renesas R-Car Video Input driver from SIMPLE_DEV_PM_OPS() to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr(). This lets us drop the __maybe_unused annotations from its suspend and resume callbacks, and reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled. Signed-off-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Fabrizio Castro <[email protected]> Reviewed-by: Niklas Söderlund <[email protected]> Reviewed-by: Laurent Pinchart <[email protected]> Signed-off-by: Laurent Pinchart <[email protected]> Signed-off-by: Hans Verkuil <[email protected]>
1 parent a0e4177 commit cde682d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/media/platform/renesas/rcar-vin/rcar-core.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ static int rvin_isp_init(struct rvin_dev *vin)
849849
* Suspend / Resume
850850
*/
851851

852-
static int __maybe_unused rvin_suspend(struct device *dev)
852+
static int rvin_suspend(struct device *dev)
853853
{
854854
struct rvin_dev *vin = dev_get_drvdata(dev);
855855

@@ -861,7 +861,7 @@ static int __maybe_unused rvin_suspend(struct device *dev)
861861
return 0;
862862
}
863863

864-
static int __maybe_unused rvin_resume(struct device *dev)
864+
static int rvin_resume(struct device *dev)
865865
{
866866
struct rvin_dev *vin = dev_get_drvdata(dev);
867867

@@ -1276,13 +1276,13 @@ static void rcar_vin_remove(struct platform_device *pdev)
12761276
rvin_dma_unregister(vin);
12771277
}
12781278

1279-
static SIMPLE_DEV_PM_OPS(rvin_pm_ops, rvin_suspend, rvin_resume);
1279+
static DEFINE_SIMPLE_DEV_PM_OPS(rvin_pm_ops, rvin_suspend, rvin_resume);
12801280

12811281
static struct platform_driver rcar_vin_driver = {
12821282
.driver = {
12831283
.name = "rcar-vin",
12841284
.suppress_bind_attrs = true,
1285-
.pm = &rvin_pm_ops,
1285+
.pm = pm_sleep_ptr(&rvin_pm_ops),
12861286
.of_match_table = rvin_of_id_table,
12871287
},
12881288
.probe = rcar_vin_probe,

0 commit comments

Comments
 (0)