From: Brian Masney Subject: Re: [PATCH] watchdog: qcom: Add suspend/resume support Date: Thu, 17 Jan 2019 04:31:13 -0500 Message-ID: <20190117093113.GA23389@basecamp> References: <20190117091555.2018-1-saiprakash.ranjan@codeaurora.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190117091555.2018-1-saiprakash.ranjan@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org To: Sai Prakash Ranjan Cc: Guenter Roeck , Wim Van Sebroeck , linux-watchdog@vger.kernel.org, Guenter Roeck , Rajendra Nayak , Vivek Gautam , Sibi Sankar , Stephen Boyd , Doug Anderson , Bjorn Andersson , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org List-Id: linux-arm-msm@vger.kernel.org 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