From patchwork Fri Jan 31 14:18:13 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 3561771 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id ED3C69F382 for ; Fri, 31 Jan 2014 14:20:28 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id EEB0420213 for ; Fri, 31 Jan 2014 14:20:27 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id ADD68201FD for ; Fri, 31 Jan 2014 14:20:26 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9EwZ-0001Bt-5I; Fri, 31 Jan 2014 14:19:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9EwQ-00013E-EF; Fri, 31 Jan 2014 14:19:34 +0000 Received: from mail-ea0-f172.google.com ([209.85.215.172]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W9Evy-0000wr-HN for linux-arm-kernel@lists.infradead.org; Fri, 31 Jan 2014 14:19:08 +0000 Received: by mail-ea0-f172.google.com with SMTP id l9so1123235eaj.3 for ; Fri, 31 Jan 2014 06:18:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references:content-type; bh=T5+zTNJe5kXoHFso9KDQKwWcwg0lhnQD1vwiAI5PoQY=; b=Ks77ttJtmIIl14V+P37PB0H8w+TlLB1Cnm3h1nFAMoaCk/pkdOcqVRlmHU6nasfJoe dApr8jlJe1dt2DzsLUWc5E61UwXMrOXa4nB9qvsHMHGjX+8aGF87ErNwA0PTJ8QkZBP5 QUdargFLaBaHkOiu46IXccYnbdxayXl+XKYF4uuZN5j85Lgf6eUm26Mg7gIsyIRM1K1B fM5ogBcDnypSoHHG2qSlyvdjcVMebQfuZeiSmS/B5WfkgIzrLJOMWXxYpjCr9+E6aqhT cTKbMiibFYvFSgSttrxdub/FIeVP/jzaYd1UI37NospgmKHulphn/+Cmo2qjDOIEaJ/V eWOA== X-Gm-Message-State: ALoCoQmvU54EllZ1E+DFb89gw0HLq4HKpsvTXpADS3y8HvSt87fre8OrqgvtHOLaWf/dJViPzdVU X-Received: by 10.14.115.8 with SMTP id d8mr3946435eeh.83.1391177921680; Fri, 31 Jan 2014 06:18:41 -0800 (PST) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id 46sm36844725ees.4.2014.01.31.06.18.40 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Fri, 31 Jan 2014 06:18:40 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Subject: [PATCH 04/10] watchdog: xilinx: Move no_timeout to probe function Date: Fri, 31 Jan 2014 15:18:13 +0100 Message-Id: <8273bfbdf42dcd94f4e05a543de19b200f192e66.1391177880.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: References: In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140131_091906_744881_0E9195CC X-CRM114-Status: GOOD ( 13.26 ) X-Spam-Score: -1.9 (-) Cc: Wim Van Sebroeck , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_TVD_MIME_NO_HEADERS, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP no_timeout should be local variable because it is used only in probe function. Signed-off-by: Michal Simek Reviewed-by: Guenter Roeck --- drivers/watchdog/of_xilinx_wdt.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) -- 1.8.2.3 diff --git a/drivers/watchdog/of_xilinx_wdt.c b/drivers/watchdog/of_xilinx_wdt.c index 7f371ed..1f7ad91 100644 --- a/drivers/watchdog/of_xilinx_wdt.c +++ b/drivers/watchdog/of_xilinx_wdt.c @@ -52,7 +52,6 @@ struct xwdt_device { static struct xwdt_device xdev; static u32 timeout; -static u8 no_timeout; static DEFINE_SPINLOCK(spinlock); @@ -160,8 +159,7 @@ static int xwdt_probe(struct platform_device *pdev) u32 *tmptr; u32 *pfreq; struct resource *res; - - no_timeout = 0; + bool no_timeout = false; res = platform_get_resource(pdev, IORESOURCE_MEM, 0); xdev.base = devm_ioremap_resource(&pdev->dev, res); @@ -173,14 +171,14 @@ static int xwdt_probe(struct platform_device *pdev) if (pfreq == NULL) { pr_warn("The watchdog clock frequency cannot be obtained!\n"); - no_timeout = 1; + no_timeout = true; } tmptr = (u32 *)of_get_property(pdev->dev.of_node, "xlnx,wdt-interval", NULL); if (tmptr == NULL) { pr_warn("Parameter \"xlnx,wdt-interval\" not found in device tree!\n"); - no_timeout = 1; + no_timeout = true; } else { xdev.wdt_interval = *tmptr; }