diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-11-24 19:54:49 +0100 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-12-03 20:36:17 +0100 |
commit | 89d3b3603bfb648e0113d8682d4f84dd18a776bd (patch) | |
tree | 6b18d5664317092bb5e757daa21a3ca6536ec3df /drivers/ata/pata_cmd64x.c | |
parent | pata_hpt366: fix timing register documentation (diff) | |
download | linux-89d3b3603bfb648e0113d8682d4f84dd18a776bd.tar.xz linux-89d3b3603bfb648e0113d8682d4f84dd18a776bd.zip |
ata: use pci_dev->revision
Some places were using PCI_CLASS_REVISION instead of PCI_REVISION_ID, so
they weren't converted by commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65
(PCI: Change all drivers to use pci_device->revision).
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_cmd64x.c')
-rw-r--r-- | drivers/ata/pata_cmd64x.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index e4d3a1e6b8c7..dadfc358ba1c 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c @@ -388,8 +388,6 @@ static struct ata_port_operations cmd648_port_ops = { static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) { - u32 class_rev; - static const struct ata_port_info cmd_info[6] = { { /* CMD 643 - no UDMA */ .flags = ATA_FLAG_SLAVE_POSS, @@ -440,18 +438,15 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) if (rc) return rc; - pci_read_config_dword(pdev, PCI_CLASS_REVISION, &class_rev); - class_rev &= 0xFF; - if (id->driver_data == 0) /* 643 */ ata_pci_bmdma_clear_simplex(pdev); if (pdev->device == PCI_DEVICE_ID_CMD_646) { /* Does UDMA work ? */ - if (class_rev > 4) + if (pdev->revision > 4) ppi[0] = &cmd_info[2]; /* Early rev with other problems ? */ - else if (class_rev == 1) + else if (pdev->revision == 1) ppi[0] = &cmd_info[3]; } |