]> err.no Git - linux-2.6/blobdiff - drivers/usb/gadget/amd5536udc.c
USB: amd5536udc - remove set_mwi() compiler warning
[linux-2.6] / drivers / usb / gadget / amd5536udc.c
index 714156ca8fe470ac4b59210d09d21da4fffb288f..c72e9620bf8dc67164dfc64eaa9da2488e834282 100644 (file)
@@ -69,7 +69,7 @@
 
 /* gadget stack */
 #include <linux/usb/ch9.h>
-#include <linux/usb_gadget.h>
+#include <linux/usb/gadget.h>
 
 /* udc specific */
 #include "amd5536udc.h"
@@ -3244,7 +3244,6 @@ static int udc_pci_probe(
                retval = -ENOMEM;
                goto finished;
        }
-       memset(dev, 0, sizeof(struct udc));
 
        /* pci setup */
        if (pci_enable_device(pdev) < 0) {
@@ -3286,14 +3285,12 @@ static int udc_pci_probe(
 
        pci_set_drvdata(pdev, dev);
 
-       /* chip revision */
-       dev->chiprev = 0;
+       /* chip revision for Hs AMD5536 */
+       dev->chiprev = pdev->revision;
 
        pci_set_master(pdev);
-       pci_set_mwi(pdev);
+       pci_try_set_mwi(pdev);
 
-       /* chip rev for Hs AMD5536 */
-       pci_read_config_byte(pdev, PCI_REVISION_ID, (u8 *) &dev->chiprev);
        /* init dma pools */
        if (use_dma) {
                retval = init_dma_pools(dev);