From: Guenter Roeck <linux@roeck-us.net>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Wim Van Sebroeck" <wim@linux-watchdog.org>
Cc: linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@pengutronix.de
Subject: Re: [PATCH 1/3] watchdog: bcm47xx: Simplify using devm_watchdog_register_device()
Date: Mon, 6 Mar 2023 12:17:39 -0800 [thread overview]
Message-ID: <ea4bcac7-e78d-d051-21fe-1014d39cd52a@roeck-us.net> (raw)
In-Reply-To: <20230306170901.2232323-2-u.kleine-koenig@pengutronix.de>
On 3/6/23 09:08, Uwe Kleine-König wrote:
> 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/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);
Oops, all those need &pdev->dev as first argument. Please resend with that fixed.
Thanks,
Guenter
> 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);
next prev parent reply other threads:[~2023-03-06 20:17 UTC|newest]
Thread overview: 10+ 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 [this message]
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 ` [PATCH 3/3] watchdog: wm8350: " Uwe Kleine-König
2023-03-06 17:31 ` 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=ea4bcac7-e78d-d051-21fe-1014d39cd52a@roeck-us.net \
--to=linux@roeck-us.net \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=u.kleine-koenig@pengutronix.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox