diff options
author | Sergei Shtylyov <sshtylyov@ru.mvista.com> | 2009-11-24 13:54:49 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-12-03 14:36:17 -0500 |
commit | 89d3b3603bfb648e0113d8682d4f84dd18a776bd (patch) | |
tree | 6b18d5664317092bb5e757daa21a3ca6536ec3df /drivers/ata/pata_cmd64x.c | |
parent | 82beb5d89456a4c8329676985004b93a7ded5b5a (diff) |
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 = { | |||
388 | 388 | ||
389 | static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | 389 | static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
390 | { | 390 | { |
391 | u32 class_rev; | ||
392 | |||
393 | static const struct ata_port_info cmd_info[6] = { | 391 | static const struct ata_port_info cmd_info[6] = { |
394 | { /* CMD 643 - no UDMA */ | 392 | { /* CMD 643 - no UDMA */ |
395 | .flags = ATA_FLAG_SLAVE_POSS, | 393 | .flags = ATA_FLAG_SLAVE_POSS, |
@@ -440,18 +438,15 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
440 | if (rc) | 438 | if (rc) |
441 | return rc; | 439 | return rc; |
442 | 440 | ||
443 | pci_read_config_dword(pdev, PCI_CLASS_REVISION, &class_rev); | ||
444 | class_rev &= 0xFF; | ||
445 | |||
446 | if (id->driver_data == 0) /* 643 */ | 441 | if (id->driver_data == 0) /* 643 */ |
447 | ata_pci_bmdma_clear_simplex(pdev); | 442 | ata_pci_bmdma_clear_simplex(pdev); |
448 | 443 | ||
449 | if (pdev->device == PCI_DEVICE_ID_CMD_646) { | 444 | if (pdev->device == PCI_DEVICE_ID_CMD_646) { |
450 | /* Does UDMA work ? */ | 445 | /* Does UDMA work ? */ |
451 | if (class_rev > 4) | 446 | if (pdev->revision > 4) |
452 | ppi[0] = &cmd_info[2]; | 447 | ppi[0] = &cmd_info[2]; |
453 | /* Early rev with other problems ? */ | 448 | /* Early rev with other problems ? */ |
454 | else if (class_rev == 1) | 449 | else if (pdev->revision == 1) |
455 | ppi[0] = &cmd_info[3]; | 450 | ppi[0] = &cmd_info[3]; |
456 | } | 451 | } |
457 | 452 | ||