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_hpt3x2n.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_hpt3x2n.c')
-rw-r--r-- | drivers/ata/pata_hpt3x2n.c | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c index 26f50af0ad89..d30da8072091 100644 --- a/drivers/ata/pata_hpt3x2n.c +++ b/drivers/ata/pata_hpt3x2n.c | |||
@@ -449,10 +449,8 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
449 | .port_ops = &hpt3x2n_port_ops | 449 | .port_ops = &hpt3x2n_port_ops |
450 | }; | 450 | }; |
451 | const struct ata_port_info *ppi[] = { &info, NULL }; | 451 | const struct ata_port_info *ppi[] = { &info, NULL }; |
452 | 452 | u8 rev = dev->revision; | |
453 | u8 irqmask; | 453 | u8 irqmask; |
454 | u32 class_rev; | ||
455 | |||
456 | unsigned int pci_mhz; | 454 | unsigned int pci_mhz; |
457 | unsigned int f_low, f_high; | 455 | unsigned int f_low, f_high; |
458 | int adjust; | 456 | int adjust; |
@@ -464,26 +462,23 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
464 | if (rc) | 462 | if (rc) |
465 | return rc; | 463 | return rc; |
466 | 464 | ||
467 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); | ||
468 | class_rev &= 0xFF; | ||
469 | |||
470 | switch(dev->device) { | 465 | switch(dev->device) { |
471 | case PCI_DEVICE_ID_TTI_HPT366: | 466 | case PCI_DEVICE_ID_TTI_HPT366: |
472 | if (class_rev < 6) | 467 | if (rev < 6) |
473 | return -ENODEV; | 468 | return -ENODEV; |
474 | break; | 469 | break; |
475 | case PCI_DEVICE_ID_TTI_HPT371: | 470 | case PCI_DEVICE_ID_TTI_HPT371: |
476 | if (class_rev < 2) | 471 | if (rev < 2) |
477 | return -ENODEV; | 472 | return -ENODEV; |
478 | /* 371N if rev > 1 */ | 473 | /* 371N if rev > 1 */ |
479 | break; | 474 | break; |
480 | case PCI_DEVICE_ID_TTI_HPT372: | 475 | case PCI_DEVICE_ID_TTI_HPT372: |
481 | /* 372N if rev >= 2*/ | 476 | /* 372N if rev >= 2*/ |
482 | if (class_rev < 2) | 477 | if (rev < 2) |
483 | return -ENODEV; | 478 | return -ENODEV; |
484 | break; | 479 | break; |
485 | case PCI_DEVICE_ID_TTI_HPT302: | 480 | case PCI_DEVICE_ID_TTI_HPT302: |
486 | if (class_rev < 2) | 481 | if (rev < 2) |
487 | return -ENODEV; | 482 | return -ENODEV; |
488 | break; | 483 | break; |
489 | case PCI_DEVICE_ID_TTI_HPT372N: | 484 | case PCI_DEVICE_ID_TTI_HPT372N: |