mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 22:22:08 +02:00
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 <geert+renesas@glider.be> Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com> Reviewed-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
a0e4177138
commit
cde682d151
|
|
@ -849,7 +849,7 @@ static int rvin_isp_init(struct rvin_dev *vin)
|
|||
* Suspend / Resume
|
||||
*/
|
||||
|
||||
static int __maybe_unused rvin_suspend(struct device *dev)
|
||||
static int rvin_suspend(struct device *dev)
|
||||
{
|
||||
struct rvin_dev *vin = dev_get_drvdata(dev);
|
||||
|
||||
|
|
@ -861,7 +861,7 @@ static int __maybe_unused rvin_suspend(struct device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused rvin_resume(struct device *dev)
|
||||
static int rvin_resume(struct device *dev)
|
||||
{
|
||||
struct rvin_dev *vin = dev_get_drvdata(dev);
|
||||
|
||||
|
|
@ -1276,13 +1276,13 @@ static void rcar_vin_remove(struct platform_device *pdev)
|
|||
rvin_dma_unregister(vin);
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(rvin_pm_ops, rvin_suspend, rvin_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(rvin_pm_ops, rvin_suspend, rvin_resume);
|
||||
|
||||
static struct platform_driver rcar_vin_driver = {
|
||||
.driver = {
|
||||
.name = "rcar-vin",
|
||||
.suppress_bind_attrs = true,
|
||||
.pm = &rvin_pm_ops,
|
||||
.pm = pm_sleep_ptr(&rvin_pm_ops),
|
||||
.of_match_table = rvin_of_id_table,
|
||||
},
|
||||
.probe = rcar_vin_probe,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user