From patchwork Tue Feb 11 06:55:47 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 3625171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EB78FBF418 for ; Tue, 11 Feb 2014 06:58:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2E47B201F4 for ; Tue, 11 Feb 2014 06:58:43 +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 305A3201F7 for ; Tue, 11 Feb 2014 06:58:42 +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 1WD7HV-0007NC-CU; Tue, 11 Feb 2014 06:57:21 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WD7HD-0000SO-UE; Tue, 11 Feb 2014 06:57:03 +0000 Received: from mail-ea0-f171.google.com ([209.85.215.171]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WD7Gg-0000Lu-0B for linux-arm-kernel@lists.infradead.org; Tue, 11 Feb 2014 06:56:31 +0000 Received: by mail-ea0-f171.google.com with SMTP id f15so3469468eak.30 for ; Mon, 10 Feb 2014 22:56:08 -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=YsWk6C1AXr3tpq39J6mTJT6nhHXTDY6yiqxju7VI9KM=; b=hziPfxtG7y5pOqV1TwrMBLRPOfj2NXBZgfUuvWy0GKvfBeBlqAMNR1I8zuKOIusimY REFJn+WfUzSGuUEruOllxqVv3Pp50JaJ7jn5nP34e/t2FHcS2XY78mt8t04nXg66x7QG 61KFL3lBSnT8rAHIeotfyXsR+i/cTjhrxQm0NKd3A4uLsllzz3w7clB+nq27xQqgNO6w t6AONRJIz7EXtsWt4VGuddg9A5gdy8j6KakLMoR4JiHoZSnzrqSYAJgrqIQcXNHB3nrh S1wXtXpkEngctOuvC0J3R5+jWl+h4/3twuwuH26BD4xYRGDcC6AN3yXABMbYBuj4gBpx u7JQ== X-Gm-Message-State: ALoCoQlOjbrxWZlvagpqtTM+GuOov0ewCRwfasj37KHycKH5ce85RsHo9IA7cTdVEbP+28NSJFCy X-Received: by 10.14.1.68 with SMTP id 44mr22327426eec.0.1392101768326; Mon, 10 Feb 2014 22:56:08 -0800 (PST) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id f45sm63514205eeg.5.2014.02.10.22.56.06 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Mon, 10 Feb 2014 22:56:07 -0800 (PST) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Subject: [PATCH v2 04/11] watchdog: xilinx: Move no_timeout to probe function Date: Tue, 11 Feb 2014 07:55:47 +0100 Message-Id: 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-20140211_015630_233612_296849E6 X-CRM114-Status: GOOD ( 13.67 ) X-Spam-Score: -1.9 (-) Cc: linux-arm-kernel@lists.infradead.org, Wim Van Sebroeck , linux-watchdog@vger.kernel.org, Guenter Roeck 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 --- Changes in v2: None 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; }