From: Sergei Shtylyov <sshtylyov@ru.mvista.com>
To: linux-mmc@vger.kernel.org, cjb@laptop.org
Cc: brucechang@via.com.tw, HaraldWelte@viatech.com
Subject: [PATCH] MMC: use pci_dev->revision
Date: Thu, 17 Mar 2011 21:08:45 +0300 [thread overview]
Message-ID: <201103172108.45989.sshtylyov@ru.mvista.com> (raw)
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 the similar
code too. So convert both drivers to using the 'revision' field of 'struct
pci_dev' now...
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
---
The patch is against the recent Linus' tree.
drivers/mmc/host/sdhci-pci.c | 6 ++----
drivers/mmc/host/via-sdmmc.c | 5 ++---
2 files changed, 4 insertions(+), 7 deletions(-)
Index: linux-2.6/drivers/mmc/host/sdhci-pci.c
===================================================================
--- linux-2.6.orig/drivers/mmc/host/sdhci-pci.c
+++ linux-2.6/drivers/mmc/host/sdhci-pci.c
@@ -1012,16 +1012,14 @@ static int __devinit sdhci_pci_probe(str
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: linux-2.6/drivers/mmc/host/via-sdmmc.c
===================================================================
--- linux-2.6.orig/drivers/mmc/host/via-sdmmc.c
+++ linux-2.6/drivers/mmc/host/via-sdmmc.c
@@ -1090,14 +1090,13 @@ static int __devinit via_sd_probe(struct
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)
next reply other threads:[~2011-03-17 18:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-17 18:08 Sergei Shtylyov [this message]
2011-03-18 11:24 ` [PATCH] MMC: use pci_dev->revision Harald Welte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201103172108.45989.sshtylyov@ru.mvista.com \
--to=sshtylyov@ru.mvista.com \
--cc=HaraldWelte@viatech.com \
--cc=brucechang@via.com.tw \
--cc=cjb@laptop.org \
--cc=linux-mmc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox