PCI: Change all drivers to use pci_device->revision
[GitHub/LineageOS/android_kernel_motorola_exynos9610.git] / drivers / net / sunhme.c
index 15146a119230e6b9d48dd00c74654aeff4d11a47..8b35f13318ea4b9e02b87644ed955a897985219d 100644 (file)
@@ -3095,12 +3095,8 @@ static int __devinit happy_meal_pci_probe(struct pci_dev *pdev,
 
 #ifdef CONFIG_SPARC
        hp->hm_revision = of_getintprop_default(dp, "hm-rev", 0xff);
-       if (hp->hm_revision == 0xff) {
-               unsigned char prev;
-
-               pci_read_config_byte(pdev, PCI_REVISION_ID, &prev);
-               hp->hm_revision = 0xc0 | (prev & 0x0f);
-       }
+       if (hp->hm_revision == 0xff)
+               hp->hm_revision = 0xc0 | (pdev->revision & 0x0f);
 #else
        /* works with this on non-sparc hosts */
        hp->hm_revision = 0x20;