mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
watchdog: renesas_wdt: Convert to DEFINE_SIMPLE_DEV_PM_OPS()
Convert the Renesas WDT watchdog 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: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/3d6d46ff56c908880a167ffb2a74c713060a1a57.1752088043.git.geert+renesas@glider.be Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
committed by
Wim Van Sebroeck
parent
40efc43eb7
commit
801c6592bf
@@ -300,7 +300,7 @@ static void rwdt_remove(struct platform_device *pdev)
|
||||
pm_runtime_disable(&pdev->dev);
|
||||
}
|
||||
|
||||
static int __maybe_unused rwdt_suspend(struct device *dev)
|
||||
static int rwdt_suspend(struct device *dev)
|
||||
{
|
||||
struct rwdt_priv *priv = dev_get_drvdata(dev);
|
||||
|
||||
@@ -310,7 +310,7 @@ static int __maybe_unused rwdt_suspend(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused rwdt_resume(struct device *dev)
|
||||
static int rwdt_resume(struct device *dev)
|
||||
{
|
||||
struct rwdt_priv *priv = dev_get_drvdata(dev);
|
||||
|
||||
@@ -320,7 +320,7 @@ static int __maybe_unused rwdt_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static SIMPLE_DEV_PM_OPS(rwdt_pm_ops, rwdt_suspend, rwdt_resume);
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(rwdt_pm_ops, rwdt_suspend, rwdt_resume);
|
||||
|
||||
static const struct of_device_id rwdt_ids[] = {
|
||||
{ .compatible = "renesas,rcar-gen2-wdt", },
|
||||
@@ -334,7 +334,7 @@ static struct platform_driver rwdt_driver = {
|
||||
.driver = {
|
||||
.name = "renesas_wdt",
|
||||
.of_match_table = rwdt_ids,
|
||||
.pm = &rwdt_pm_ops,
|
||||
.pm = pm_sleep_ptr(&rwdt_pm_ops),
|
||||
},
|
||||
.probe = rwdt_probe,
|
||||
.remove = rwdt_remove,
|
||||
|
||||
Reference in New Issue
Block a user