lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <84cd135f-118e-4c61-8a80-0cd93159d106@roeck-us.net>
Date:   Mon, 6 Mar 2023 09:31:24 -0800
From:   Guenter Roeck <linux@...ck-us.net>
To:     Uwe Kleine-König 
        <u.kleine-koenig@...gutronix.de>
Cc:     Wim Van Sebroeck <wim@...ux-watchdog.org>,
        patches@...nsource.cirrus.com, linux-watchdog@...r.kernel.org,
        linux-kernel@...r.kernel.org, kernel@...gutronix.de
Subject: Re: [PATCH 3/3] watchdog: wm8350: Simplify using
 devm_watchdog_register_device()

On Mon, Mar 06, 2023 at 06:09:01PM +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@...gutronix.de>

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

> ---
>  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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ