Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1396890ybn; Wed, 25 Sep 2019 17:44:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsb+082PQqYaPiptNfme/6YhZKeMd/4vhRUkSVVqMUA6/OBuRb3ZgpAVtqELBS+1isI4vX X-Received: by 2002:a50:d51b:: with SMTP id u27mr800477edi.249.1569458655194; Wed, 25 Sep 2019 17:44:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569458655; cv=none; d=google.com; s=arc-20160816; b=hUU2vSUyMijiJxRtIV9NLoCsxQJs+DbiDYVf78G3q8pwIhQZNsl2ezJ86DVxN5Dfrr lIqAlbOghrayPr7+vayMDlxAzSmYesa06L59xThBCo0S56sa8WMhUf7VdeE+GXoXZFek 3pXef+9+8wkgxUU77lys7TnXzkSY50VS/l9gKWzVI3S/O+oacIdGm0AmTnQDcGZxmtMV eCrOTic7emoA3UhTKf4ziFT8g4g2fXnaoBfeOS4WUDqG4gzyVABVHv9MlI7oRQUNVqTM xskl99ExhvB9y2yxoeyL0X9jRZwqW5z7NbLdGMclnBBzXf/HLr2ltjNq47hKvQmxM8GL YTZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=rdILR4nvo3WJj79CYrckUizxBysJpf9qnC2JlLOiDrI=; b=iimUQufMOIR4JsKYmGUUamy8tJBvlzJoFJQ5v/bi3k7Ihq+6f/TL//3kfVuy8lW5hG yOEuFLGCQXPbvfsKB7G+PSQCIpiv9emG9uYHqKGKdp2V+LFSQKFFzcKIBZDeO92sSJat BH2mEKeG2CAykLVZTTYKtm6RGR5QGVJcFsvJ3Ohna0Md94FtmVPqD1mTsvt84hoWYRMU xnGzF/7S8Tee07bfL4bnFR2s5IxIUfXtAblIgWdKWc46N5qjMuQyJWApCekBZqlvj/ct 9zYWGr8nMxOwTlS/dp5eRJdG7plUTnnBnwphzPn3aMTstezLYJWLSUwSJmutTrKT0E/8 v09Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j14si354942edt.298.2019.09.25.17.43.51; Wed, 25 Sep 2019 17:44:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2502255AbfIXHIy (ORCPT + 99 others); Tue, 24 Sep 2019 03:08:54 -0400 Received: from inva020.nxp.com ([92.121.34.13]:41636 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2409184AbfIXHIs (ORCPT ); Tue, 24 Sep 2019 03:08:48 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 9AE031A00B5; Tue, 24 Sep 2019 09:08:46 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 087061A03AC; Tue, 24 Sep 2019 09:08:42 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 2147A402ED; Tue, 24 Sep 2019 15:08:36 +0800 (SGT) From: Anson Huang To: wim@linux-watchdog.org, linux@roeck-us.net, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 2/3] watchdog: imx2_wdt: Use __maybe_unused instead of #if CONFIG_PM_SLEEP Date: Tue, 24 Sep 2019 15:07:07 +0800 Message-Id: <1569308828-8320-2-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1569308828-8320-1-git-send-email-Anson.Huang@nxp.com> References: <1569308828-8320-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use __maybe_unused for power management related functions instead of #if CONFIG_PM_SLEEP to simply the code. Signed-off-by: Anson Huang --- drivers/watchdog/imx2_wdt.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/watchdog/imx2_wdt.c b/drivers/watchdog/imx2_wdt.c index 6711b4e..034f32c 100644 --- a/drivers/watchdog/imx2_wdt.c +++ b/drivers/watchdog/imx2_wdt.c @@ -358,9 +358,8 @@ static void imx2_wdt_shutdown(struct platform_device *pdev) } } -#ifdef CONFIG_PM_SLEEP /* Disable watchdog if it is active or non-active but still running */ -static int imx2_wdt_suspend(struct device *dev) +static int __maybe_unused imx2_wdt_suspend(struct device *dev) { struct watchdog_device *wdog = dev_get_drvdata(dev); struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog); @@ -381,7 +380,7 @@ static int imx2_wdt_suspend(struct device *dev) } /* Enable watchdog and configure it if necessary */ -static int imx2_wdt_resume(struct device *dev) +static int __maybe_unused imx2_wdt_resume(struct device *dev) { struct watchdog_device *wdog = dev_get_drvdata(dev); struct imx2_wdt_device *wdev = watchdog_get_drvdata(wdog); @@ -406,7 +405,6 @@ static int imx2_wdt_resume(struct device *dev) return 0; } -#endif static SIMPLE_DEV_PM_OPS(imx2_wdt_pm_ops, imx2_wdt_suspend, imx2_wdt_resume); -- 2.7.4