Re: [PATCH] staging:ced1401: use module_usb_driver macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 20, 2012 at 12:06 PM, Devendra Naga <devendra.aaru@xxxxxxxxx> wrote:
> the module init and exit functions that are
> doing usb_register and usb_deregister respectively can be
> replaced with module_usb_driver code
>
> Signed-off-by: Devendra Naga <devendra.aaru@xxxxxxxxx>
> ---
>  drivers/staging/ced1401/usb1401.c |   16 +---------------
>  1 files changed, 1 insertions(+), 15 deletions(-)
>
> diff --git a/drivers/staging/ced1401/usb1401.c b/drivers/staging/ced1401/usb1401.c
> index 69b7f20..59d69b4 100644
> --- a/drivers/staging/ced1401/usb1401.c
> +++ b/drivers/staging/ced1401/usb1401.c
> @@ -1653,19 +1653,5 @@ static struct usb_driver ced_driver = {
>         .supports_autosuspend = 1,
>  };
>
> -static int __init usb_skel_init(void)
> -{
> -       /* register this driver with the USB subsystem */
> -       return usb_register(&ced_driver);
> -}
> -
> -static void __exit usb_skel_exit(void)
> -{
> -       /* deregister this driver with the USB subsystem */
> -       usb_deregister(&ced_driver);
> -}
> -
> -module_init(usb_skel_init);
> -module_exit(usb_skel_exit);
> -
> +module_usb_driver(ced_driver);
>  MODULE_LICENSE("GPL");
> --
> 1.7.1
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux