mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
media: rkvdec: Switch to modern PM_OPS
A new set of modern PM_OPS macros got defined in commit
1a3c7bb088 ("PM: core: Add new *_PM_OPS macros, deprecate old ones")
Switch to those new macros so that the PM callbacks are always seen by the
compiler, but discarded if not used. This lets us drop the check for
CONFIG_PM.
Signed-off-by: Diederik de Haas <diederik@cknow-tech.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
8af0e2bdd9
commit
1e93157ca8
|
|
@ -1872,7 +1872,6 @@ static void rkvdec_remove(struct platform_device *pdev)
|
|||
iommu_domain_free(rkvdec->empty_domain);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int rkvdec_runtime_resume(struct device *dev)
|
||||
{
|
||||
struct rkvdec_dev *rkvdec = dev_get_drvdata(dev);
|
||||
|
|
@ -1887,12 +1886,10 @@ static int rkvdec_runtime_suspend(struct device *dev)
|
|||
clk_bulk_disable_unprepare(rkvdec->num_clocks, rkvdec->clocks);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops rkvdec_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
|
||||
pm_runtime_force_resume)
|
||||
SET_RUNTIME_PM_OPS(rkvdec_runtime_suspend, rkvdec_runtime_resume, NULL)
|
||||
SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, pm_runtime_force_resume)
|
||||
RUNTIME_PM_OPS(rkvdec_runtime_suspend, rkvdec_runtime_resume, NULL)
|
||||
};
|
||||
|
||||
static struct platform_driver rkvdec_driver = {
|
||||
|
|
@ -1901,7 +1898,7 @@ static struct platform_driver rkvdec_driver = {
|
|||
.driver = {
|
||||
.name = "rkvdec",
|
||||
.of_match_table = of_rkvdec_match,
|
||||
.pm = &rkvdec_pm_ops,
|
||||
.pm = pm_ptr(&rkvdec_pm_ops),
|
||||
},
|
||||
};
|
||||
module_platform_driver(rkvdec_driver);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user