All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Wim Van Sebroeck <wim@linux-watchdog.org>,
	Guenter Roeck <linux@roeck-us.net>
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	[thread overview]
Message-ID: <20230306170901.2232323-4-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20230306170901.2232323-1-u.kleine-koenig@pengutronix.de>

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 <u.kleine-koenig@pengutronix.de>
---
 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",
 	},
-- 
2.39.1


  parent reply	other threads:[~2023-03-06 17:10 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 17:08 [PATCH 0/3] watchdog: Simplify using devm_watchdog_register_device() Uwe Kleine-König
2023-03-06 17:08 ` [PATCH 1/3] watchdog: bcm47xx: " Uwe Kleine-König
2023-03-06 17:30   ` Guenter Roeck
2023-03-06 20:17   ` Guenter Roeck
2023-03-07  1:08   ` kernel test robot
2023-03-06 17:09 ` [PATCH 2/3] watchdog: rn5t618: " Uwe Kleine-König
2023-03-06 17:31   ` Guenter Roeck
2023-03-06 17:09 ` Uwe Kleine-König [this message]
2023-03-06 17:31   ` [PATCH 3/3] watchdog: wm8350: " Guenter Roeck
2023-03-06 19:39   ` kernel test robot
2023-03-06 18:21 ` [PATCH 0/3] watchdog: " Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230306170901.2232323-4-u.kleine-koenig@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --cc=kernel@pengutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=patches@opensource.cirrus.com \
    --cc=wim@linux-watchdog.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.