Re: [PATCH] watchdog: qcom: Add suspend/resume support
From: Brian Masney
Date: Thu Jan 17 2019 - 04:31:18 EST
On Thu, Jan 17, 2019 at 02:45:55PM +0530, Sai Prakash Ranjan wrote:
> +#ifdef CONFIG_PM_SLEEP
> +static int qcom_wdt_suspend(struct device *dev)
> +{
> + struct qcom_wdt *wdt = dev_get_drvdata(dev);
> +
> + if (watchdog_active(&wdt->wdd))
> + qcom_wdt_stop(&wdt->wdd);
> +
> + return 0;
> +}
> +
> +static int qcom_wdt_resume(struct device *dev)
> +{
> + struct qcom_wdt *wdt = dev_get_drvdata(dev);
> +
> + if (watchdog_active(&wdt->wdd))
> + qcom_wdt_start(&wdt->wdd);
> +
> + return 0;
> +}
> +#endif /* CONFIG_PM_SLEEP */
You can use the __maybe_unused attribute to remove the #ifdef:
static int __maybe_unused qcom_wdt_suspend(struct device *dev)
Brian