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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230308230521.GA8064@matrix-ESPRIMO-P710>
Date:   Thu, 9 Mar 2023 00:05:21 +0100
From:   philipp hortmann <philipp.g.hortmann@...il.com>
To:     Martin Kaiser <martin@...ser.cx>
Cc:     Jes Sorensen <Jes.Sorensen@...il.com>,
        Kalle Valo <kvalo@...nel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] wifi: rtl8xxxu: use module_usb_driver

On Tue, Mar 07, 2023 at 08:57:17PM +0100, Martin Kaiser wrote:
> We can use the module_usb_driver macro instead of open-coding the driver's
> init and exit functions. This is simpler and saves some lines of code.
> Other realtek wireless drivers use module_usb_driver as well.
> 
> Signed-off-by: Martin Kaiser <martin@...ser.cx>
> ---
>  .../wireless/realtek/rtl8xxxu/rtl8xxxu_core.c | 20 +------------------
>  1 file changed, 1 insertion(+), 19 deletions(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> index e619ed21fbfe..58dbad9a14c2 100644
> --- a/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> +++ b/drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
> @@ -7455,24 +7455,6 @@ static struct usb_driver rtl8xxxu_driver = {
>  	.disable_hub_initiated_lpm = 1,
>  };
>  
> -static int __init rtl8xxxu_module_init(void)
> -{
> -	int res;
> -
> -	res = usb_register(&rtl8xxxu_driver);
> -	if (res < 0)
> -		pr_err(DRIVER_NAME ": usb_register() failed (%i)\n", res);
> -
> -	return res;
> -}
> -
> -static void __exit rtl8xxxu_module_exit(void)
> -{
> -	usb_deregister(&rtl8xxxu_driver);
> -}
> -
> -
>  MODULE_DEVICE_TABLE(usb, dev_table);
>  
> -module_init(rtl8xxxu_module_init);
> -module_exit(rtl8xxxu_module_exit);
> +module_usb_driver(rtl8xxxu_driver);
> -- 
> 2.30.2

Tested-by: Philipp Hortmann <philipp.g.hortmann@...il.com> # Edimax N150

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ