From patchwork Sat Feb 10 20:36:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcus Folkesson X-Patchwork-Id: 10210635 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4F66160329 for ; Sun, 11 Feb 2018 00:45:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3CD4D29151 for ; Sun, 11 Feb 2018 00:45:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3022B2924F; Sun, 11 Feb 2018 00:45:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RDNS_NONE autolearn=no version=3.3.1 Received: from bombadil.infradead.org (unknown [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id BC6D729151 for ; Sun, 11 Feb 2018 00:45:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=y1fnn0O5RiX6rusvtYHDWvRuswaAwP9/RsoqAGy35qI=; b=iYC q8Qzgr7NGtFo+rRX+dPEIs0iH4aC0nezyw4Yq4TSWECT7Yq0/RLozMg/MOopRToaUMXapuTttIoXR GSQiN2Ko1VihWsvBtMBS6688xQ/TUjFmFpmByXSwv3AcC9GfIm7Wzb89mAkSPijN0xwCA36+i4WzP vZp4M/iLPcPdC1QWKWCO4h+CxerQdkySodjZ2VtMV9+HdkjamjzvgPMkofu1XiVlxWBq4H3BmqNYa qQtnqzTJK4zuRI5nT6nR/PO1hwoiOSJYDERgNGo/zSEZzKXs2bqFfm9SflYFtkRSYmKsq8IkSf9Ra wdPQ20l8SbTdQDlH2q5lxw/0mAIonsg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ekfmA-0008Tf-UD; Sun, 11 Feb 2018 00:45:50 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ekflS-0005s1-3S for linux-arm-kernel@bombadil.infradead.org; Sun, 11 Feb 2018 00:45:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=UWQx0M0m2GUyVEZ9S4TLE6Q7jMLFp/7jQybKCcMiN/k=; b=NzXHmpVpW0bru3WUO5Y0yGx6M CNw6c/V2bLnhLONFSTtvhGia6f0BS9l1+uLOvVK+VLpB6RhEY1C7mQ9WlTPL4VEL5H9xIkTzVB70k mJbpJaQU87ML417Pep5NT+eNNZVfw1K6SfTopCPvasKWbJF87oGVw6ZFsF0Xd9TIw8iQYirYDtvXP ODL7ue5hM2OZ2Rx+tcnoUJZDCEkwWzBXuacyyhtgwd0u5QFEYRCfDssqe6Iq9WEFPRX4CvcAmXowg DG+mOjSYj3elhyiYJTrobydPMTX7yMBfhJR9WNiQGPFaQUZF29zBOJiqWeconD4GTz29rlmcQdxaK pEX0xOrCw==; Received: from mail-lf0-x244.google.com ([2a00:1450:4010:c07::244]) by casper.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ekbv7-0006PH-EJ for linux-arm-kernel@lists.infradead.org; Sat, 10 Feb 2018 20:38:51 +0000 Received: by mail-lf0-x244.google.com with SMTP id f137so15675514lfe.4 for ; Sat, 10 Feb 2018 12:38:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=UWQx0M0m2GUyVEZ9S4TLE6Q7jMLFp/7jQybKCcMiN/k=; b=JtGuVmSB1unlc583HhzgtMlfY/bPohp/uj2E4sAV22tY/jFhiww5i76iPKnUqLj4ST G2rbkRBqQMxrvAmJxazau41LBSPfOaVE5+vBB17Gw83VP3LOEjonv9y3yIIJPLqrTgsH 5AfK2+i4cNTEiEvCj4zKvp+q8BhqHVb0+Zq+BFKhIOVlSjyVAp9qnhlnaPhylaZK+Pyv RQvfXrhSPY/VOlRd61IVTsAJr9upwf3qBIFBfUaLlPfdWIRBytt30VAqHWUwndWR7BKt 0H63Mn/YVACbNu8JONi9KteSZTS6RfUJUWW52dBmfH1oWlHlEgGflYbwUFR/BsmZ+6Q6 easQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=UWQx0M0m2GUyVEZ9S4TLE6Q7jMLFp/7jQybKCcMiN/k=; b=aIn11aqmDLhaiWog5qsb9Z96jLIZ82VGY3vPwRwwWNXBBi+eozQgBaqvVr1E6nX+TE X0yq5YTqwS6OICZqgkR2cGJd/sBzZIxK4b9/4WfmbdTg3Cyjwsatm96mQdT+fLhBHnkS pycw68uwMkvWuCjKDuZh+wDsZPcwShgzmz4NbWcc6gzcxSbl0wmbWJUFNGjyUoldlJpS nwe7Qo/LMKe+iS8/lv6y41j7lodK6KtXGpW9cQc8FUnmBtTdm0Vgw8a2k/Iig+vPlPvC rnJcvNNvwJAI3Jvi5c6QB2AkCt9YXAGGJjKmXk3cz9w7Wlu4CcgIWGfygy9w8OcDq1n9 dMWQ== X-Gm-Message-State: APf1xPCWQG0guHqyIep7M8w+wIvgRub6OFDYourSRZy3eBAiV6BmMQm5 rUb1NNvtNDBpJtvy+wWe/ZzAv0H5 X-Google-Smtp-Source: AH8x224JcstiVuWuXMmbjkotJn60MZ11ZJMiL5R/b2CXMlkZtl5Q5t1i5OxQnZQEgd/YfZaKVXxBmQ== X-Received: by 10.25.35.132 with SMTP id j126mr3604332lfj.130.1518294997305; Sat, 10 Feb 2018 12:36:37 -0800 (PST) Received: from localhost.localdomain ([46.194.112.145]) by smtp.gmail.com with ESMTPSA id d77sm928727ljd.31.2018.02.10.12.36.35 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 10 Feb 2018 12:36:36 -0800 (PST) From: Marcus Folkesson To: Wim Van Sebroeck , Guenter Roeck , Masahiro Yamada Subject: [PATCH 1/4] watchdog: uniphier: change order for setting default timeout Date: Sat, 10 Feb 2018 21:36:20 +0100 Message-Id: <20180210203623.17832-1-marcus.folkesson@gmail.com> X-Mailer: git-send-email 2.15.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180210_203849_492549_D014BAD1 X-CRM114-Status: UNSURE ( 9.65 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marcus Folkesson , linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP watchdog_init_timeout() will preserve wdd->timeout value if no parameter nor timeout-secs dt property is set. Signed-off-by: Marcus Folkesson Reviewed-by: Guenter Roeck Acked-by: Keiji Hayashibara --- drivers/watchdog/uniphier_wdt.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/watchdog/uniphier_wdt.c b/drivers/watchdog/uniphier_wdt.c index 0ea2339d9702..0e4f8d53ce3c 100644 --- a/drivers/watchdog/uniphier_wdt.c +++ b/drivers/watchdog/uniphier_wdt.c @@ -212,11 +212,10 @@ static int uniphier_wdt_probe(struct platform_device *pdev) wdev->wdt_dev.ops = &uniphier_wdt_ops; wdev->wdt_dev.max_timeout = WDT_PERIOD_MAX; wdev->wdt_dev.min_timeout = WDT_PERIOD_MIN; + wdev->wdt_dev.timeout = WDT_DEFAULT_TIMEOUT; wdev->wdt_dev.parent = dev; - if (watchdog_init_timeout(&wdev->wdt_dev, timeout, dev) < 0) { - wdev->wdt_dev.timeout = WDT_DEFAULT_TIMEOUT; - } + watchdog_init_timeout(&wdev->wdt_dev, timeout, dev); watchdog_set_nowayout(&wdev->wdt_dev, nowayout); watchdog_stop_on_reboot(&wdev->wdt_dev);