Skip to content

Commit 801c659

Browse files
geertuWim Van Sebroeck
authored andcommitted
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 <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/3d6d46ff56c908880a167ffb2a74c713060a1a57.1752088043.git.geert+renesas@glider.be Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 40efc43 commit 801c659

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/watchdog/renesas_wdt.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ static void rwdt_remove(struct platform_device *pdev)
300300
pm_runtime_disable(&pdev->dev);
301301
}
302302

303-
static int __maybe_unused rwdt_suspend(struct device *dev)
303+
static int rwdt_suspend(struct device *dev)
304304
{
305305
struct rwdt_priv *priv = dev_get_drvdata(dev);
306306

@@ -310,7 +310,7 @@ static int __maybe_unused rwdt_suspend(struct device *dev)
310310
return 0;
311311
}
312312

313-
static int __maybe_unused rwdt_resume(struct device *dev)
313+
static int rwdt_resume(struct device *dev)
314314
{
315315
struct rwdt_priv *priv = dev_get_drvdata(dev);
316316

@@ -320,7 +320,7 @@ static int __maybe_unused rwdt_resume(struct device *dev)
320320
return 0;
321321
}
322322

323-
static SIMPLE_DEV_PM_OPS(rwdt_pm_ops, rwdt_suspend, rwdt_resume);
323+
static DEFINE_SIMPLE_DEV_PM_OPS(rwdt_pm_ops, rwdt_suspend, rwdt_resume);
324324

325325
static const struct of_device_id rwdt_ids[] = {
326326
{ .compatible = "renesas,rcar-gen2-wdt", },
@@ -334,7 +334,7 @@ static struct platform_driver rwdt_driver = {
334334
.driver = {
335335
.name = "renesas_wdt",
336336
.of_match_table = rwdt_ids,
337-
.pm = &rwdt_pm_ops,
337+
.pm = pm_sleep_ptr(&rwdt_pm_ops),
338338
},
339339
.probe = rwdt_probe,
340340
.remove = rwdt_remove,

0 commit comments

Comments
 (0)