RE: [PATCHv2 3/8] staging: comedi: das08: Use module_comedi_{pci_, }driver

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

 



On Thursday, May 24, 2012 9:27 AM, Ian Abbott wrote:
> If PCI boards are supported, use the module_comedi_pci_driver() macro to
> register the module as a comedi driver and a PCI driver.  Otherwise, if
> ISA (or PC/104) boards are supported, use the module_comedi_driver()
> macro to register the module as a comedi driver.  Otherwise, this is
> only a helper module for an external comedi driver (das08_cs).
>
> Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
> ---

<snip>

> +#else /* DO_COMEDI_DRIVER_REGISTER */
> +static int __init das08_init(void)
> +{
> +	return 0;
>  }
>  
> -static void __exit driver_das08_cleanup_module(void)
> +static void __exit das08_exit(void)
>  {
> -#if IS_ENABLED(CONFIG_COMEDI_DAS08_PCI)
> -	pci_unregister_driver(&driver_das08_pci_driver);
> -#endif
> -#ifdef DO_COMEDI_DRIVER_REGISTER
> -	comedi_driver_unregister(&driver_das08);
> -#endif
>  }
>  
> -module_init(driver_das08_init_module);
> -module_exit(driver_das08_cleanup_module);
> +module_init(das08_init);
> +module_exit(das08_exit);
> +#endif /* DO_COMEDI_DRIVER_REGISTER */

When this file is only compiled to be used as a helper library
are the module_init/module_exit stubs even needed?

Take a look at the drivers/gpio/gpio-generic.c driver for an
example.

Regards,
Hartley

_______________________________________________
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