usb: gadget: ci13xxx: rename register layouts
[deliverable/linux.git] / drivers / usb / gadget / ci13xxx_pci.c
index 883ab5e832d11ad0bc6928dbaa134f84d920d160..c890e1c5effcb0df1a8f6ee44a54bc3abb718f6e 100644 (file)
@@ -55,6 +55,7 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev,
                                       const struct pci_device_id *id)
 {
        void __iomem *regs = NULL;
+       uintptr_t capoffset = DEF_CAPOFFSET;
        int retval = 0;
 
        if (id == NULL)
@@ -86,7 +87,11 @@ static int __devinit ci13xxx_pci_probe(struct pci_dev *pdev,
        pci_set_master(pdev);
        pci_try_set_mwi(pdev);
 
-       retval = udc_probe(&ci13xxx_pci_udc_driver, &pdev->dev, regs);
+       if (pdev->vendor == PCI_VENDOR_ID_INTEL)
+               capoffset = 0;
+
+       retval = udc_probe(&ci13xxx_pci_udc_driver, &pdev->dev, regs,
+                          capoffset);
        if (retval)
                goto iounmap;
 
@@ -148,27 +153,7 @@ static struct pci_driver ci13xxx_pci_driver = {
        .remove       = __devexit_p(ci13xxx_pci_remove),
 };
 
-/**
- * ci13xxx_pci_init: module init
- *
- * Driver load
- */
-static int __init ci13xxx_pci_init(void)
-{
-       return pci_register_driver(&ci13xxx_pci_driver);
-}
-module_init(ci13xxx_pci_init);
-
-/**
- * ci13xxx_pci_exit: module exit
- *
- * Driver unload
- */
-static void __exit ci13xxx_pci_exit(void)
-{
-       pci_unregister_driver(&ci13xxx_pci_driver);
-}
-module_exit(ci13xxx_pci_exit);
+module_pci_driver(ci13xxx_pci_driver);
 
 MODULE_AUTHOR("MIPS - David Lopo <dlopo@chipidea.mips.com>");
 MODULE_DESCRIPTION("MIPS CI13XXX USB Peripheral Controller");
This page took 0.024631 seconds and 5 git commands to generate.