Skip to content

Commit a6fd606

Browse files
Jingoo Handavem330
authored andcommitted
ide: cs5536: use module_pci_driver()
Use module_pci_driver() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 58e48be commit a6fd606

1 file changed

Lines changed: 1 addition & 12 deletions

File tree

‎drivers/ide/cs5536.c‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -295,15 +295,7 @@ static struct pci_driver cs5536_pci_driver = {
295295
.resume = ide_pci_resume,
296296
};
297297

298-
static int __init cs5536_init(void)
299-
{
300-
return pci_register_driver(&cs5536_pci_driver);
301-
}
302-
303-
static void __exit cs5536_exit(void)
304-
{
305-
pci_unregister_driver(&cs5536_pci_driver);
306-
}
298+
module_pci_driver(cs5536_pci_driver);
307299

308300
MODULE_AUTHOR("Martin K. Petersen, Bartlomiej Zolnierkiewicz");
309301
MODULE_DESCRIPTION("low-level driver for the CS5536 IDE controller");
@@ -312,6 +304,3 @@ MODULE_DEVICE_TABLE(pci, cs5536_pci_tbl);
312304

313305
module_param_named(msr, use_msr, int, 0644);
314306
MODULE_PARM_DESC(msr, "Force using MSR to configure IDE function (Default: 0)");
315-
316-
module_init(cs5536_init);
317-
module_exit(cs5536_exit);

0 commit comments

Comments
 (0)