mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-28 15:13:55 +08:00
staging/comedi/cb_das16_cs: Convert to module_comedi_pcmcia_driver
This patch removes the boring init/exit functions with the new module_comedi_pcmcia_driver macro. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f3493a973d
commit
66bf1ed6f6
@ -548,30 +548,7 @@ static struct pcmcia_driver das16cs_driver = {
|
|||||||
.id_table = das16cs_id_table,
|
.id_table = das16cs_id_table,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init das16cs_init(void)
|
module_comedi_pcmcia_driver(driver_das16cs, das16cs_driver);
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
ret = comedi_driver_register(&driver_das16cs);
|
|
||||||
if (ret < 0)
|
|
||||||
return ret;
|
|
||||||
|
|
||||||
ret = pcmcia_register_driver(&das16cs_driver);
|
|
||||||
if (ret < 0) {
|
|
||||||
comedi_driver_unregister(&driver_das16cs);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
module_init(das16cs_init);
|
|
||||||
|
|
||||||
static void __exit das16cs_exit(void)
|
|
||||||
{
|
|
||||||
pcmcia_unregister_driver(&das16cs_driver);
|
|
||||||
comedi_driver_unregister(&driver_das16cs);
|
|
||||||
}
|
|
||||||
module_exit(das16cs_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("David A. Schleef <ds@schleef.org>");
|
MODULE_AUTHOR("David A. Schleef <ds@schleef.org>");
|
||||||
MODULE_DESCRIPTION("Comedi driver for Computer Boards PC-CARD DAS16/16");
|
MODULE_DESCRIPTION("Comedi driver for Computer Boards PC-CARD DAS16/16");
|
||||||
|
Loading…
Reference in New Issue
Block a user