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); From patchwork Mon Mar 6 17:09:00 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: 64995 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1970347wrd; Mon, 6 Mar 2023 09:25:59 -0800 (PST) X-Google-Smtp-Source: AK7set94rGAyO+pzrhfvJ9NlOSeS88w1dI0jdh4/REvhkIlOAechpwsRp8kN0cADZABYJLl/a/wI X-Received: by 2002:a05:6402:34c:b0:4ac:c39b:8450 with SMTP id r12-20020a056402034c00b004acc39b8450mr11010781edw.8.1678123559714; Mon, 06 Mar 2023 09:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1678123559; cv=none; d=google.com; s=arc-20160816; b=WzoOJftR05QMdKP8+2myXQ1/DFSMcSHlCd0X9EXa7+5SiAVQSUi3ti8HGOzxrQEsdi yGGsXXalh7yqeGzXs79XcOqI7KHr69e+A9lYj4wicMMTL7z3gAusFACtT5mSAoQ1SPe7 OcpexiaZ2gtFG5PTeGHciYfdEmtS5QiYm57LBohfXKpG0mTbpLJlf3tcNfw112kwwg/d /gzUEavkdElJR6lboFDOCTHa5MeYGX21+28tSWrgV2Nu6FSlub6Z9w7B6lx2rU7pfdsF gxcX461Y3rXOGzGS4n1jaVdKgNu3Rj+f7SUIlrZ8ZJgm2NvuDmfCvXgmGswLB53GjcTl OcLg== 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=sZsmM6cBLavjP771jjAVKi3mfxYRMD7WeP8icLEuI4U=; b=BnwBvZ/h0alEIKW1hr9xqUCjRukeNvqH8hHxOaQGqWDf0dZ1wkAulsP4Bi/fUYLfKL bmJaQKA8/rTvUKpt34sIaocua1NVj85uPrq3oBFcqMvm5vtGFdnqGcWK77IOU1b7LnDw 9PtEHjBGEUhYxp8bLomgF3Y9x0YRBWOY6Rzw1tm4/iDM+l3zTfQmHd71bxvb1oWCt/1n muzPQYVQO1BEYVk+aQh2a1rktv1W8VB69IH1sYa6ueu3QdVLhCJnKIneAiG/rSfl5kIV lgnelRbY6ndm5vIyISx7zluDWxg0C0PCDNC5P2G/aDR7QW/hIGkQrjq8GtCzZIqXY1Va INvQ== 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 f23-20020a056402069700b004af5153cd4asi8956275edy.26.2023.03.06.09.25.35; Mon, 06 Mar 2023 09:25:59 -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 S229681AbjCFRKr (ORCPT + 99 others); Mon, 6 Mar 2023 12:10:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229586AbjCFRKl (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 91E464B81C for ; Mon, 6 Mar 2023 09:09:59 -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-0004gY-Ob; 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-002Ifa-3q; 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-002l00-Cx; 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 2/3] watchdog: rn5t618: Simplify using devm_watchdog_register_device() Date: Mon, 6 Mar 2023 18:09:00 +0100 Message-Id: <20230306170901.2232323-3-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=1160; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=bq6NqBPM2LpQjqHH+4WiBPfT6AZw0afyjHDglX+lfrE=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkBh4kcQSPD/UEwhLVFLaxTT2V0AkW1LUmJOVjp Jsf4kObGEOJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZAYeJAAKCRDB/BR4rcrs CV5nB/9rkdIe4mcbTBAj5LhKKdzS5BaKKxVCC+gyNSSR3xuNG6MBORABaZ5buKQv10Lm3jnzS0y qb64s39Rg0YbNk2jtZTgtbH+rcgO/+pPQBPa1IGIDTGXLLR4XKokj5crVQ6w93U/JeYjoszXIA9 7NXr7Evb+v1yk8ABRo+YeFpO27W4igey+FqvpxKKN4kBw155WRoUONTS3LahX37RxHGjxXRL/kJ 32rT2CcUakFk8E3orvmMof0EToPtDPz8itzcOmTb25YbBi6hNPsBTWGEfCkAac/gVuMIoCLr/wn 28023F34fYeC9MOSB0Ujb2xpPKRyZULRxpaMyAmYY4stp2hl 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?1759640089495394746?= X-GMAIL-MSGID: =?utf-8?q?1759640089495394746?= 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/rn5t618_wdt.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/watchdog/rn5t618_wdt.c b/drivers/watchdog/rn5t618_wdt.c index 40d8ebd8c0ac..c0aee627ff3b 100644 --- a/drivers/watchdog/rn5t618_wdt.c +++ b/drivers/watchdog/rn5t618_wdt.c @@ -178,21 +178,11 @@ static int rn5t618_wdt_probe(struct platform_device *pdev) platform_set_drvdata(pdev, wdt); - return watchdog_register_device(&wdt->wdt_dev); -} - -static int rn5t618_wdt_remove(struct platform_device *pdev) -{ - struct rn5t618_wdt *wdt = platform_get_drvdata(pdev); - - watchdog_unregister_device(&wdt->wdt_dev); - - return 0; + return devm_watchdog_register_device(&wdt->wdt_dev); } static struct platform_driver rn5t618_wdt_driver = { .probe = rn5t618_wdt_probe, - .remove = rn5t618_wdt_remove, .driver = { .name = DRIVER_NAME, }, 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", },