diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2018-02-07 14:47:56 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-03-14 12:54:09 -0400 |
commit | b0b0a6438ea5d20ff4b0f64af0f210029d146079 (patch) | |
tree | 5f342b20daae1185eea529f878bbe26215b1152a /drivers/parport/parport_serial.c | |
parent | 82dfabf1c4d5f76d2ed854ae30e4af7f7291bf0c (diff) |
parport: Switch to use module_pci_driver() macro
Eliminate some boilerplate code by using module_pci_driver() instead of
init/exit, moving the salient bits from init into probe.
Tested-by: Nikola Ciprich <nikola.ciprich@linuxbox.cz>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/parport/parport_serial.c')
-rw-r--r-- | drivers/parport/parport_serial.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/drivers/parport/parport_serial.c b/drivers/parport/parport_serial.c index c56bb06b82d0..08e218e67101 100644 --- a/drivers/parport/parport_serial.c +++ b/drivers/parport/parport_serial.c | |||
@@ -694,22 +694,8 @@ static struct pci_driver parport_serial_pci_driver = { | |||
694 | .pm = &parport_serial_pm_ops, | 694 | .pm = &parport_serial_pm_ops, |
695 | }, | 695 | }, |
696 | }; | 696 | }; |
697 | 697 | module_pci_driver(parport_serial_pci_driver); | |
698 | |||
699 | static int __init parport_serial_init (void) | ||
700 | { | ||
701 | return pci_register_driver (&parport_serial_pci_driver); | ||
702 | } | ||
703 | |||
704 | static void __exit parport_serial_exit (void) | ||
705 | { | ||
706 | pci_unregister_driver (&parport_serial_pci_driver); | ||
707 | return; | ||
708 | } | ||
709 | 698 | ||
710 | MODULE_AUTHOR("Tim Waugh <twaugh@redhat.com>"); | 699 | MODULE_AUTHOR("Tim Waugh <twaugh@redhat.com>"); |
711 | MODULE_DESCRIPTION("Driver for common parallel+serial multi-I/O PCI cards"); | 700 | MODULE_DESCRIPTION("Driver for common parallel+serial multi-I/O PCI cards"); |
712 | MODULE_LICENSE("GPL"); | 701 | MODULE_LICENSE("GPL"); |
713 | |||
714 | module_init(parport_serial_init); | ||
715 | module_exit(parport_serial_exit); | ||