From patchwork Thu Apr 14 05:42:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Farber, Eliav" X-Patchwork-Id: 563946 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C34F3C433EF for ; Thu, 14 Apr 2022 05:42:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233837AbiDNFpQ (ORCPT ); Thu, 14 Apr 2022 01:45:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234640AbiDNFpN (ORCPT ); Thu, 14 Apr 2022 01:45:13 -0400 Received: from smtp-fw-80007.amazon.com (smtp-fw-80007.amazon.com [99.78.197.218]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 537A24A92A; Wed, 13 Apr 2022 22:42:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazon201209; t=1649914970; x=1681450970; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kt5nspYjRt8wh1mWWFLNQsJk52QOffqs+u6TEiueePQ=; b=igWRcbusW/CKPlrumnyZMFmtOoHgRzkZgNkGHTmaGVmNsv5r0BAaaIK0 0RSawy69k7Owo3HAxIxxBXOH5OT4eKKvyn1MQMS0sc3HrySM5AVDXBTS4 g97MXs/jiVPP3Kc2MHN5EHWkCG6yV0j7yWw5x/rqEB89mxbVMxXLhcAU1 8=; X-IronPort-AV: E=Sophos;i="5.90,258,1643673600"; d="scan'208";a="79538830" Received: from pdx4-co-svc-p1-lb2-vlan2.amazon.com (HELO email-inbound-relay-pdx-2a-9938edb1.us-west-2.amazon.com) ([10.25.36.210]) by smtp-border-fw-80007.pdx80.corp.amazon.com with ESMTP; 14 Apr 2022 05:42:35 +0000 Received: from EX13MTAUWB001.ant.amazon.com (pdx1-ws-svc-p6-lb9-vlan2.pdx.amazon.com [10.236.137.194]) by email-inbound-relay-pdx-2a-9938edb1.us-west-2.amazon.com (Postfix) with ESMTPS id 50A0981B71; Thu, 14 Apr 2022 05:42:34 +0000 (UTC) Received: from EX13D13UWB004.ant.amazon.com (10.43.161.218) by EX13MTAUWB001.ant.amazon.com (10.43.161.249) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 14 Apr 2022 05:42:33 +0000 Received: from EX13MTAUWB001.ant.amazon.com (10.43.161.207) by EX13D13UWB004.ant.amazon.com (10.43.161.218) with Microsoft SMTP Server (TLS) id 15.0.1497.32; Thu, 14 Apr 2022 05:42:33 +0000 Received: from dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (172.19.116.181) by mail-relay.amazon.com (10.43.161.249) with Microsoft SMTP Server id 15.0.1497.32 via Frontend Transport; Thu, 14 Apr 2022 05:42:33 +0000 Received: by dev-dsk-farbere-1a-46ecabed.eu-west-1.amazon.com (Postfix, from userid 14301484) id 446272E6C; Thu, 14 Apr 2022 05:42:33 +0000 (UTC) From: Eliav Farber To: , , , CC: , , , , , , Subject: [PATCH v2 1/1] watchdog: sp805: disable watchdog on remove Date: Thu, 14 Apr 2022 05:42:33 +0000 Message-ID: <20220414054233.1357-2-farbere@amazon.com> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20220414054233.1357-1-farbere@amazon.com> References: <20220414054233.1357-1-farbere@amazon.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Disable the watchdog if it is active while removing the module. It is necessary in order to prevent a reset in case watchdog hw was running before the removal. Signed-off-by: Eliav Farber Reviewed-by: Guenter Roeck --- drivers/watchdog/sp805_wdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c index d8876fba686d..69a6182c2dfe 100644 --- a/drivers/watchdog/sp805_wdt.c +++ b/drivers/watchdog/sp805_wdt.c @@ -273,6 +273,7 @@ sp805_wdt_probe(struct amba_device *adev, const struct amba_id *id) watchdog_set_nowayout(&wdt->wdd, nowayout); watchdog_set_drvdata(&wdt->wdd, wdt); watchdog_set_restart_priority(&wdt->wdd, 128); + watchdog_stop_on_unregister(&wdt->wdd); /* * If 'timeout-sec' devicetree property is specified, use that.