[PATCH] OHCI: use pci_dev->revision

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit ab1666c1364a209e6141d7c14e47a42b5f00eca2 (USB: quirk PLL power down mode)
added code that reads the revision ID from the PCI configuration register while
it's stored by PCI subsystem in the 'revision' field of 'struct pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@xxxxxxxxxxxxx>

---
This patch is against the recent 'usb-next' branch of Greg KH's usb-2.6.git.

 drivers/usb/host/ohci-pci.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: usb-2.6/drivers/usb/host/ohci-pci.c
===================================================================
--- usb-2.6.orig/drivers/usb/host/ohci-pci.c
+++ usb-2.6/drivers/usb/host/ohci-pci.c
@@ -151,7 +151,7 @@ static int ohci_quirk_amd700(struct usb_
 {
 	struct ohci_hcd *ohci = hcd_to_ohci(hcd);
 	struct pci_dev *amd_smbus_dev;
-	u8 rev = 0;
+	u8 rev;
 
 	if (usb_amd_find_chipset_info())
 		ohci->flags |= OHCI_QUIRK_AMD_PLL;
@@ -161,7 +161,7 @@ static int ohci_quirk_amd700(struct usb_
 	if (!amd_smbus_dev)
 		return 0;
 
-	pci_read_config_byte(amd_smbus_dev, PCI_REVISION_ID, &rev);
+	rev = amd_smbus_dev->revision;
 
 	/* SB800 needs pre-fetch fix */
 	if ((rev >= 0x40) && (rev <= 0x4f)) {
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux