diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-03-12 12:06:15 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-16 15:17:31 (GMT) |
commit | eb7403756fb68e4509cfdde3e3d7ba0576e0abf0 (patch) | |
tree | 0bb6686301f73ad8bd7bbeebe72e0276ab386f95 /drivers/staging/rts5208/rtsx.c | |
parent | 5cc8c56841f28a08c93a63d166530eef82f11073 (diff) | |
download | linux-eb7403756fb68e4509cfdde3e3d7ba0576e0abf0.tar.xz |
Staging: rts5208: Use module_pci_driver
Macro module_pci_driver is used for drivers whose init
and exit paths does only register and unregister to pci
API. So, here remove some boilerplate code by using
module_pci_driver. Also, change driver to rtsx_driver,
to avoid implicitly redefining driver_init.
Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rts5208/rtsx.c')
-rw-r--r-- | drivers/staging/rts5208/rtsx.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index 7f2c0c3..c482a6a 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -1036,7 +1036,7 @@ static const struct pci_device_id rtsx_ids[] = { MODULE_DEVICE_TABLE(pci, rtsx_ids); /* pci_driver definition */ -static struct pci_driver driver = { +static struct pci_driver rtsx_driver = { .name = CR_DRIVER_NAME, .id_table = rtsx_ids, .probe = rtsx_probe, @@ -1048,21 +1048,4 @@ static struct pci_driver driver = { .shutdown = rtsx_shutdown, }; -static int __init rtsx_init(void) -{ - pr_info("Initializing Realtek PCIE storage driver...\n"); - - return pci_register_driver(&driver); -} - -static void __exit rtsx_exit(void) -{ - pr_info("rtsx_exit() called\n"); - - pci_unregister_driver(&driver); - - pr_info("%s module exit\n", CR_DRIVER_NAME); -} - -module_init(rtsx_init) -module_exit(rtsx_exit) +module_pci_driver(rtsx_driver); |