diff options
author | Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> | 2014-05-20 18:30:07 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-30 12:33:33 -0500 |
commit | 9a028e46fc0aeb0e5036ac1f4393653404242a1a (patch) | |
tree | 3fd5694c39bdc379765662145d634194cd402bed /drivers | |
parent | 00d4db0e8539571382e9629c6bc5195263f6a960 (diff) | |
download | linux-9a028e46fc0aeb0e5036ac1f4393653404242a1a.tar.gz linux-9a028e46fc0aeb0e5036ac1f4393653404242a1a.tar.bz2 linux-9a028e46fc0aeb0e5036ac1f4393653404242a1a.zip |
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')
-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) void __iomem *base = NULL; int retval, i; + if (!use_dma) + use_dma_chaining = 0; + /* alloc, and start init */ dev = kzalloc (sizeof *dev, GFP_KERNEL); if (dev == NULL){ @@ -3833,20 +3836,8 @@ static struct pci_driver net2280_pci_driver = { /* FIXME add power management support */ }; +module_pci_driver(net2280_pci_driver); + MODULE_DESCRIPTION (DRIVER_DESC); MODULE_AUTHOR ("David Brownell"); MODULE_LICENSE ("GPL"); - -static int __init init (void) -{ - if (!use_dma) - use_dma_chaining = 0; - return pci_register_driver (&net2280_pci_driver); -} -module_init (init); - -static void __exit cleanup (void) -{ - pci_unregister_driver (&net2280_pci_driver); -} -module_exit (cleanup); |