From patchwork Fri Jul 18 12:10:28 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jiri Slaby X-Patchwork-Id: 33848 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-yk0-f198.google.com (mail-yk0-f198.google.com [209.85.160.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C5E31208CF for ; Fri, 18 Jul 2014 13:21:08 +0000 (UTC) Received: by mail-yk0-f198.google.com with SMTP id q200sf7235155ykb.9 for ; Fri, 18 Jul 2014 06:21:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=dF/AeZx5cgzATcy3w5ftcwqTdtug1JvFyUlvHke8wzM=; b=l2Fd31lmABPL6z0qJcGztL8w9Q08lAtNY52vqNPR6XLRr7yaZDr9kGEogA4GcSyltG 4YVjQWL5tNshXVhYYgzf8aAl8AUlHvCi6TteREjnzL+53lPHYoPWHOW0Q/7LRIpqXYsE CWxEpmsOpYLvmfFXqqydoZrmMAqADpc7kSP3Kfm7y7kcSHqfsedMqcSWw79D5K/sigPU j+N/pOdgiNMIL1xzYU2e6DKtklp7wSIPIyuM6MurJzZkxY3V9qOlOCO7u367GNMlSzXN T6doGhgbKXGbTSUgyf8by2JL3xEXfDGB5299CtPYEPTqahvA13S/g5b3OoyM3YRWg7oD IvsA== X-Gm-Message-State: ALoCoQk3VK1PUwA/4m35hGO4G86YBvLykzcOSHLfoJ9bup4aOn5cVtGVve4hZ5pnMtgJqudTZEpL X-Received: by 10.236.101.148 with SMTP id b20mr2014482yhg.46.1405689668529; Fri, 18 Jul 2014 06:21:08 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.108.228 with SMTP id j91ls969472qgf.31.gmail; Fri, 18 Jul 2014 06:21:08 -0700 (PDT) X-Received: by 10.220.251.134 with SMTP id ms6mr5936270vcb.10.1405689668420; Fri, 18 Jul 2014 06:21:08 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id nc1si5648153veb.6.2014.07.18.06.21.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 18 Jul 2014 06:21:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hu12so7175313vcb.20 for ; Fri, 18 Jul 2014 06:21:07 -0700 (PDT) X-Received: by 10.220.118.136 with SMTP id v8mr5755347vcq.50.1405689667015; Fri, 18 Jul 2014 06:21:07 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp10597vcb; Fri, 18 Jul 2014 06:21:06 -0700 (PDT) X-Received: by 10.67.15.40 with SMTP id fl8mr5011272pad.69.1405689665668; Fri, 18 Jul 2014 06:21:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id jx3si5886387pbc.150.2014.07.18.06.21.01; Fri, 18 Jul 2014 06:21:01 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935104AbaGRNQB (ORCPT + 25 others); Fri, 18 Jul 2014 09:16:01 -0400 Received: from bband-dyn38.178-41-141.t-com.sk ([178.41.141.38]:17842 "EHLO ip4-83-240-18-248.cust.nbox.cz" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1161155AbaGRNPu (ORCPT ); Fri, 18 Jul 2014 09:15:50 -0400 Received: from ku by ip4-83-240-18-248.cust.nbox.cz with local (Exim 4.82) (envelope-from ) id 1X871z-0004rI-Jj; Fri, 18 Jul 2014 14:12:55 +0200 From: Jiri Slaby To: stable@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Viresh Kumar , Wim Van Sebroeck , Jiri Slaby Subject: [PATCH 3.12 023/170] watchdog: sp805: Set watchdog_device->timeout from ->set_timeout() Date: Fri, 18 Jul 2014 14:10:28 +0200 Message-Id: <3ffceee7c5ae8ccaf1ede159d8e3878be9c5c625.1405685481.git.jslaby@suse.cz> X-Mailer: git-send-email 2.0.0 In-Reply-To: <48e8cad86bb1241c08bdaa80db022c25068ff8e0.1405685481.git.jslaby@suse.cz> References: <48e8cad86bb1241c08bdaa80db022c25068ff8e0.1405685481.git.jslaby@suse.cz> In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linux-kernel-owner@vger.kernel.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Viresh Kumar 3.12-stable review patch. If anyone has any objections, please let me know. =============== commit 938626d96a3ffb9eb54552bb0d3a4f2b30ffdeb0 upstream. Implementation of ->set_timeout() is supposed to set 'timeout' field of 'struct watchdog_device' passed to it. sp805 was rather setting this in a local variable. Fix it. Reported-by: Arun Ramamurthy Signed-off-by: Viresh Kumar Reviewed-by: Guenter Roeck Signed-off-by: Wim Van Sebroeck Signed-off-by: Jiri Slaby --- drivers/watchdog/sp805_wdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index 58df98aec122..2cf02ffbf9d8 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c @@ -60,7 +60,6 @@ * @adev: amba device structure of wdt * @status: current status of wdt * @load_val: load value to be set for current timeout - * @timeout: current programmed timeout */ struct sp805_wdt { struct watchdog_device wdd; @@ -69,7 +68,6 @@ struct sp805_wdt { struct clk *clk; struct amba_device *adev; unsigned int load_val; - unsigned int timeout; }; static bool nowayout = WATCHDOG_NOWAYOUT; @@ -99,7 +97,7 @@ static int wdt_setload(struct watchdog_device *wdd, unsigned int timeout) spin_lock(&wdt->lock); wdt->load_val = load; /* roundup timeout to closest positive integer value */ - wdt->timeout = div_u64((load + 1) * 2 + (rate / 2), rate); + wdd->timeout = div_u64((load + 1) * 2 + (rate / 2), rate); spin_unlock(&wdt->lock); return 0;