diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2014-05-20 12:30:07 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-30 13:33:33 -0400 |
commit | 9a028e46fc0aeb0e5036ac1f4393653404242a1a (patch) | |
tree | 3fd5694c39bdc379765662145d634194cd402bed /drivers/usb/gadget/net2280.c | |
parent | 00d4db0e8539571382e9629c6bc5195263f6a960 (diff) |
usb: gadget: net2280: Use module_pci_driver macro
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/net2280.c')
-rw-r--r-- | drivers/usb/gadget/net2280.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index b43725a039c6..bd851de7112b 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -3588,6 +3588,9 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) | |||
3588 | void __iomem *base = NULL; | 3588 | void __iomem *base = NULL; |
3589 | int retval, i; | 3589 | int retval, i; |
3590 | 3590 | ||
3591 | if (!use_dma) | ||
3592 | use_dma_chaining = 0; | ||
3593 | |||
3591 | /* alloc, and start init */ | 3594 | /* alloc, and start init */ |
3592 | dev = kzalloc (sizeof *dev, GFP_KERNEL); | 3595 | dev = kzalloc (sizeof *dev, GFP_KERNEL); |
3593 | if (dev == NULL){ | 3596 | if (dev == NULL){ |
@@ -3833,20 +3836,8 @@ static struct pci_driver net2280_pci_driver = { | |||
3833 | /* FIXME add power management support */ | 3836 | /* FIXME add power management support */ |
3834 | }; | 3837 | }; |
3835 | 3838 | ||
3839 | module_pci_driver(net2280_pci_driver); | ||
3840 | |||
3836 | MODULE_DESCRIPTION (DRIVER_DESC); | 3841 | MODULE_DESCRIPTION (DRIVER_DESC); |
3837 | MODULE_AUTHOR ("David Brownell"); | 3842 | MODULE_AUTHOR ("David Brownell"); |
3838 | MODULE_LICENSE ("GPL"); | 3843 | MODULE_LICENSE ("GPL"); |
3839 | |||
3840 | static int __init init (void) | ||
3841 | { | ||
3842 | if (!use_dma) | ||
3843 | use_dma_chaining = 0; | ||
3844 | return pci_register_driver (&net2280_pci_driver); | ||
3845 | } | ||
3846 | module_init (init); | ||
3847 | |||
3848 | static void __exit cleanup (void) | ||
3849 | { | ||
3850 | pci_unregister_driver (&net2280_pci_driver); | ||
3851 | } | ||
3852 | module_exit (cleanup); | ||