mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Wim Van Sebroeck <wim@linux-watchdog.org>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel@pengutronix.de
Subject: Re: [PATCH 2/3] watchdog: rn5t618: Simplify using devm_watchdog_register_device()
Date: Mon, 6 Mar 2023 09:31:11 -0800	[thread overview]
Message-ID: <c029adf2-7f7e-452f-bc35-b2ecbf0d3128@roeck-us.net> (raw)
In-Reply-To: <20230306170901.2232323-3-u.kleine-koenig@pengutronix.de>

On Mon, Mar 06, 2023 at 06:09:00PM +0100, 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>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  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,
>  	},
> -- 
> 2.39.1
> 

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-06 17:08 [PATCH 0/3] watchdog: " 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-06 17:09 ` [PATCH 2/3] watchdog: rn5t618: " Uwe Kleine-König
2023-03-06 17:31   ` Guenter Roeck [this message]
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=c029adf2-7f7e-452f-bc35-b2ecbf0d3128@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

all inboxes | Powered by JetHome®