Skip to content

Commit ebe66de

Browse files
Anson-HuangWim Van Sebroeck
authored andcommitted
watchdog: imx2_wdt: Use __maybe_unused instead of #if CONFIG_PM_SLEEP
Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simply the code. Signed-off-by: Anson Huang <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
1 parent 87d1846 commit ebe66de

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

drivers/watchdog/imx2_wdt.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -358,9 +358,8 @@ static void imx2_wdt_shutdown(struct platform_device *pdev)
358358
}
359359
}
360360

361-
#ifdef CONFIG_PM_SLEEP
362361
/* Disable watchdog if it is active or non-active but still running */
363-
static int imx2_wdt_suspend(struct device *dev)
362+
static int __maybe_unused imx2_wdt_suspend(struct device *dev)
364363
{
365364
struct watchdog_device *wdog = dev_get_drvdata(dev);
366365
struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
@@ -381,7 +380,7 @@ static int imx2_wdt_suspend(struct device *dev)
381380
}
382381

383382
/* Enable watchdog and configure it if necessary */
384-
static int imx2_wdt_resume(struct device *dev)
383+
static int __maybe_unused imx2_wdt_resume(struct device *dev)
385384
{
386385
struct watchdog_device *wdog = dev_get_drvdata(dev);
387386
struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog);
@@ -406,7 +405,6 @@ static int imx2_wdt_resume(struct device *dev)
406405

407406
return 0;
408407
}
409-
#endif
410408

411409
static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend,
412410
imx2_wdt_resume);

0 commit comments

Comments
 (0)