PCI: Change all drivers to use pci_device->revision
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / drivers / ide / pci / sis5513.c
index f875183ac8d9bfef0b338c06f6e567852e856d79..756a9b6eb4624aa5688d3b2420a5dbde659a5977 100644 (file)
@@ -659,9 +659,7 @@ static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const c
 
                /* Special case for SiS630 : 630S/ET is ATA_100a */
                if (SiSHostChipInfo[i].host_id == PCI_DEVICE_ID_SI_630) {
-                       u8 hostrev;
-                       pci_read_config_byte(host, PCI_REVISION_ID, &hostrev);
-                       if (hostrev >= 0x30)
+                       if (host->revision >= 0x30)
                                chipset_family = ATA_100a;
                }
                pci_dev_put(host);
@@ -702,7 +700,6 @@ static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const c
                        u16 trueid;
                        u8 prefctl;
                        u8 idecfg;
-                       u8 sbrev;
 
                        pci_read_config_byte(dev, 0x4a, &idecfg);
                        pci_write_config_byte(dev, 0x4a, idecfg | 0x10);
@@ -712,11 +709,10 @@ static unsigned int __devinit init_chipset_sis5513 (struct pci_dev *dev, const c
                        if (trueid == 0x5517) { /* SiS 961/961B */
 
                                lpc_bridge = pci_get_slot(dev->bus, 0x10); /* Bus 0, Dev 2, Fn 0 */
-                               pci_read_config_byte(lpc_bridge, PCI_REVISION_ID, &sbrev);
                                pci_read_config_byte(dev, 0x49, &prefctl);
                                pci_dev_put(lpc_bridge);
 
-                               if (sbrev == 0x10 && (prefctl & 0x80)) {
+                               if (lpc_bridge->revision == 0x10 && (prefctl & 0x80)) {
                                        printk(KERN_INFO "SIS5513: SiS 961B MuTIOL IDE UDMA133 controller\n");
                                        chipset_family = ATA_133a;
                                } else {