From patchwork Mon Mar 6 17:08:59 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: 64990 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1969283wrd; Mon, 6 Mar 2023 09:24:05 -0800 (PST) X-Google-Smtp-Source: AK7set/xN/HKS/+K+wZEAcLmov3NIsoyAI7e8WhNLZ0nnfQ4ncr6AIjL0pYU0h4EX60ystSGnBVC X-Received: by 2002:a17:902:e886:b0:199:4a00:9788 with SMTP id w6-20020a170902e88600b001994a009788mr15264147plg.19.1678123445417; Mon, 06 Mar 2023 09:24:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678123445; cv=none; d=google.com; s=arc-20160816; b=bP7jqlMIr95vT3clFwDQDtu8rd+/ejGfwFvcBSMs0Z3NANaLlh4zCr4IHDgvaWOtnm hsk1hJCgqJjR1nF4bJiWUlDKljRKBpcCrUHEEPkjBIfHhzH2STDk0dpdDhtuGK1NcdW8 o4RL6yzMP7xWiVfcdzx2/Gky9yBlTYDCKLkqOvye7Q2MdJzOx35EBNqaVyzUhmngUjI9 SV6loQkQ3XXJjukSF6ZnUPvf3+HwNRgI5xWRojHDtgXzzVy2kwPeS4G7y2C5nUqOYYLo Ofr4LcLko8YoZwo03lGZi+7hUA9NHu/IaktaYA2RvgaygVySn5sPh3ASpcYMBmhKfeRw 0QsA== 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=AVkyIyrfLOPixiE4GbMt3QAv87MStD7iWfSjNSkvc8I=; b=il42dcIAZ5LdngJ+1T9sdbWUzyfIvxXyGQmSBxJCv4eIgihUwacVr9nEWFYTtOAZbc raeZF8D8k35S+DU1F/MzlZCD5WyKfmE8YcoyJU4FXXvy9HTilktLa7zD8aBh5gfcvcoB gSXGCSJdCApCVaSCGgGA2eXtnEoLGtuOgii9KWVGFvb47tZRqPWHwqoCiZ4THzleUjhe 2/ABauT/lDLRmrifB+6O37qjHUTA/ICuc0FGhQFRnavtkoQ2gkiXGABrFLbSVD/HTf3n YlbHa6g9LHcbwwK9w3G8AgJ3CnRFG4I+f8GZfrefiWLnjT+t2YSHdJTqZm6cECD4n/b3 Zcyg== 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 le5-20020a170902fb0500b0019edbe2894fsi284073plb.504.2023.03.06.09.23.52; Mon, 06 Mar 2023 09:24:05 -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 S230236AbjCFRKx (ORCPT + 99 others); Mon, 6 Mar 2023 12:10:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230076AbjCFRKl (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 3E20421A30 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 1pZEKh-0004gW-Lc; Mon, 06 Mar 2023 18:09:07 +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-002IfU-14; 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-002kzx-6q; Mon, 06 Mar 2023 18:09:06 +0100 From: =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= To: Wim Van Sebroeck , Guenter Roeck Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH 1/3] watchdog: bcm47xx: Simplify using devm_watchdog_register_device() Date: Mon, 6 Mar 2023 18:08:59 +0100 Message-Id: <20230306170901.2232323-2-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=1386; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=JOxaeQ/qlp8PNCw4eRsoKrCgQTxAkZTtmbv1GqXssTQ=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkBh4fDiTTzV3ULvk7eUHClBWcQALKE1SxTxzlm xHjedvRZNSJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAYeHwAKCRDB/BR4rcrs CV2jB/96D03Mg0dYUOOKgv8Ra1VvtupViW7kzFZNPS1pr+d0ocjF3apez4hdY/GEZ984H+io3zH EZrDpnudCfbd20WG5FnpkAsxlzKyqo2/Wt+HU8IlQnILqcWitxOF2E6mW7QEJmQrPd1aR2/Sw4+ mHy3+ad3qvnY/72Lt9dSQX5ZhLXFGeoapQCDqey9ZYyqhdLZKiRPcQKGNnwnk4QVXogOhTOpAcJ CLknVobF4mKnjfhBZ3AeN00zVTrDkEzJjeQV1+luSH4NHg7w3bLHUAvcKP9oTIS3uNtQ8XomsAI flYWK0ymYzv1UDQKN7gEKU2eVG0IsoKfVWn1dyguVmULsWcD 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?1759639969831760861?= X-GMAIL-MSGID: =?utf-8?q?1759639969831760861?= 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/bcm47xx_wdt.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/watchdog/bcm47xx_wdt.c b/drivers/watchdog/bcm47xx_wdt.c index 05425c1dfd4c..8698ef94dddf 100644 --- a/drivers/watchdog/bcm47xx_wdt.c +++ b/drivers/watchdog/bcm47xx_wdt.c @@ -202,7 +202,7 @@ static int bcm47xx_wdt_probe(struct platform_device *pdev) watchdog_set_restart_priority(&wdt->wdd, 64); watchdog_stop_on_reboot(&wdt->wdd); - ret = watchdog_register_device(&wdt->wdd); + ret = devm_watchdog_register_device(&wdt->wdd); if (ret) goto err_timer; @@ -218,21 +218,11 @@ static int bcm47xx_wdt_probe(struct platform_device *pdev) return ret; } -static int bcm47xx_wdt_remove(struct platform_device *pdev) -{ - struct bcm47xx_wdt *wdt = dev_get_platdata(&pdev->dev); - - watchdog_unregister_device(&wdt->wdd); - - return 0; -} - static struct platform_driver bcm47xx_wdt_driver = { .driver = { .name = "bcm47xx-wdt", }, .probe = bcm47xx_wdt_probe, - .remove = bcm47xx_wdt_remove, }; module_platform_driver(bcm47xx_wdt_driver);