From patchwork Mon Mar 6 17:09:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= X-Patchwork-Id: 64988 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1968938wrd; Mon, 6 Mar 2023 09:23:28 -0800 (PST) X-Google-Smtp-Source: AK7set9q0eORFb7oYkyNl93rD3WzHCs0C+Quh75eYGx2rUpIPpKV4hkjjJAQ8Tsl2rsKMIlCJug0 X-Received: by 2002:a17:902:ce91:b0:19d:1dfe:eac8 with SMTP id f17-20020a170902ce9100b0019d1dfeeac8mr16601136plg.26.1678123408417; Mon, 06 Mar 2023 09:23:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678123408; cv=none; d=google.com; s=arc-20160816; b=dkmGR/2M6GY3ypMzjLgXKD25yCA6GmRr+ubXHM7J9i521Nrtq5DzfLt21k7Uivplic B34qDHt9RB4AgKDtlECPW8VOxlTwZ7XYO1AzNXBbpVfRKxW8dTd/RqXEMTNB7ZiRRIsJ naKnKykMs19vqTM682ZkitYfr35yTLirzyg3i+OANwX39VhG0xdXXT6JNpfnXEqWZw2Y iyAfmJlsGVorSfDqV5cbI/Z/sFHQ6C/GzXDTeAibStQGaciKXmdt58pAX1eHPKMxjH7K B3W76EStEigSB2xKG4TmaPMBLqlbN1Mytb704A9TkVxbUcPbfNNNmVbp9Ep/Zdr3nT4W pgLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=tWm1MZSFNzjwPJEebdPuMhLYXka6DfEhnCSA8C6q/+U=; b=xhWXduWsyNNYLDGqolzx1b02nSCE05Ua5kgTQT/xV4fv/DEl3TpF7a85xrN2XMd7/0 6NzRF4QHLkO6e+ir/afB/JjXLmCTCuONDhkPdACGVO7sZO/Wbt1rl07Tp9AiF73Fge7r nSTk87COs1zN29tKoG+SOkuf2bCSe2axpYLvj4naKNw/Y/gPePFmBHjDAZn1oHbWSdR9 X+AXgAJdRMQ6jM32NvYi+MU1+QEN0n9YkUMB8AMVq16zKTigo9XX33pQTVY7vuEqGAwA pbEG1UOCwwoHpn2zxdcLB9lcr5Vj00oOxQ7Y89g9HKIbTReQUuuhIFafMLQGJL9VE6uT 3BZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s18-20020a17090302d200b0019aba699d56si10651635plk.608.2023.03.06.09.23.13; Mon, 06 Mar 2023 09:23:28 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229996AbjCFRKv (ORCPT + 99 others); Mon, 6 Mar 2023 12:10:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229638AbjCFRKl (ORCPT ); Mon, 6 Mar 2023 12:10:41 -0500 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E53C410BA for ; Mon, 6 Mar 2023 09:10:01 -0800 (PST) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pZEKi-0004gr-Cu; Mon, 06 Mar 2023 18:09:08 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pZEKh-002Ifd-Oe; Mon, 06 Mar 2023 18:09:07 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pZEKg-002l03-KK; Mon, 06 Mar 2023 18:09:06 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wim Van Sebroeck , Guenter Roeck Cc: patches@opensource.cirrus.com, linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 3/3] watchdog: wm8350: Simplify using devm_watchdog_register_device() Date: Mon, 6 Mar 2023 18:09:01 +0100 Message-Id: <20230306170901.2232323-4-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230306170901.2232323-1-u.kleine-koenig@pengutronix.de> References: <20230306170901.2232323-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1112; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=eKbSbgyM6iAAADJRyccERsxfhL/Xxs4zw+WOxJ+10fo=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkBh4nWsFYVrBiPkosnDl6xkGrWr/JqNqSvfocp dlwibEG0iOJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAYeJwAKCRDB/BR4rcrs CVhHCACHQhP0vt3MEa1XkSByGKFVe9hQ7w8a1xgKHQIvYp4Zbaq0qPwWSu/xd5aUGZ0jpKAey3O CFUR3rcQ6MDlCM8AbyXa+iNtxScjzIdiigono4GKYkmZmnQqt0YJOdrDMv+TSVYituJEzxT+rZL q7hYdLPtsEuAXHdbueH35QYZpGzXhWalHRNt3PeuvJS1Oj8jDuTMNxykliSwUeqGPfuYW5czzWx EhVHBBgQjuyPU8q/wgjrB+/lJ8vks54vZbXPj0k6bjWGNMWCJrx0bYo5Bjq3sg+9yveQhgBzSuB Gi0IoKbFD5ZQJdWN2MShy2NnaZxZErerPUeEGBnEWhaj0P53 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1759639931142196758?= X-GMAIL-MSGID: =?utf-8?q?1759639931142196758?= This allows to drop the .remove() function as it only exists to unregister the watchdog device which is now done in a callback registered by devm_watchdog_register_device(). Signed-off-by: Uwe Kleine-König Reviewed-by: Guenter Roeck --- drivers/watchdog/wm8350_wdt.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/watchdog/wm8350_wdt.c b/drivers/watchdog/wm8350_wdt.c index 33c62d51f00a..911ad64460a6 100644 --- a/drivers/watchdog/wm8350_wdt.c +++ b/drivers/watchdog/wm8350_wdt.c @@ -153,18 +153,11 @@ static int wm8350_wdt_probe(struct platform_device *pdev) /* Default to 4s timeout */ wm8350_wdt_set_timeout(&wm8350_wdt, 4); - return watchdog_register_device(&wm8350_wdt); -} - -static int wm8350_wdt_remove(struct platform_device *pdev) -{ - watchdog_unregister_device(&wm8350_wdt); - return 0; + return devm_watchdog_register_device(&wm8350_wdt); } static struct platform_driver wm8350_wdt_driver = { .probe = wm8350_wdt_probe, - .remove = wm8350_wdt_remove, .driver = { .name = "wm8350-wdt", },