]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: use pci_dev->revision
authorSergei Shtylyov <sshtylyov@ru.mvista.com>
Thu, 17 Mar 2011 20:46:17 +0000 (16:46 -0400)
committerChris Ball <cjb@laptop.org>
Fri, 25 Mar 2011 14:30:49 +0000 (10:30 -0400)
The SDHCI driver uses PCI_CLASS_REVISION instead of PCI_REVISION_ID, so
it was not converted by commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65
(PCI: Change all drivers to use pci_device->revision). The newer VIA
driver has similar code too. This patch converts both drivers to use
the 'revision' field of 'struct pci_dev'.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
drivers/mmc/host/sdhci-pci.c
drivers/mmc/host/via-sdmmc.c

index 2f8d46854acd0fb5430ec22ac15ed439ec3b8710..a136be7063478bc9f9f6b130cc92010c47737fc5 100644 (file)
@@ -1016,16 +1016,14 @@ static int __devinit sdhci_pci_probe(struct pci_dev *pdev,
        struct sdhci_pci_chip *chip;
        struct sdhci_pci_slot *slot;
 
-       u8 slots, rev, first_bar;
+       u8 slots, first_bar;
        int ret, i;
 
        BUG_ON(pdev == NULL);
        BUG_ON(ent == NULL);
 
-       pci_read_config_byte(pdev, PCI_CLASS_REVISION, &rev);
-
        dev_info(&pdev->dev, "SDHCI controller found [%04x:%04x] (rev %x)\n",
-                (int)pdev->vendor, (int)pdev->device, (int)rev);
+                (int)pdev->vendor, (int)pdev->device, (int)pdev->revision);
 
        ret = pci_read_config_byte(pdev, PCI_SLOT_INFO, &slots);
        if (ret)
index 8c5b4881ccd6068fc766fd6e0ae77dbbe2669664..4dfe2c02ea91f340fd3de23db2b371da9020fc91 100644 (file)
@@ -1087,14 +1087,13 @@ static int __devinit via_sd_probe(struct pci_dev *pcidev,
        struct mmc_host *mmc;
        struct via_crdr_mmc_host *sdhost;
        u32 base, len;
-       u8 rev, gatt;
+       u8  gatt;
        int ret;
 
-       pci_read_config_byte(pcidev, PCI_CLASS_REVISION, &rev);
        pr_info(DRV_NAME
                ": VIA SDMMC controller found at %s [%04x:%04x] (rev %x)\n",
                pci_name(pcidev), (int)pcidev->vendor, (int)pcidev->device,
-               (int)rev);
+               (int)pcidev->revision);
 
        ret = pci_enable_device(pcidev);
        if (ret)