aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/pata_hpt366.c
diff options
context:
space:
mode:
authorSergei Shtylyov <sshtylyov@ru.mvista.com>2009-11-24 13:54:49 -0500
committerJeff Garzik <jgarzik@redhat.com>2009-12-03 14:36:17 -0500
commit89d3b3603bfb648e0113d8682d4f84dd18a776bd (patch)
tree6b18d5664317092bb5e757daa21a3ca6536ec3df /drivers/ata/pata_hpt366.c
parent82beb5d89456a4c8329676985004b93a7ded5b5a (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_hpt366.c')
-rw-r--r--drivers/ata/pata_hpt366.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c
index 5bfae075968e..0bd48e8f21bd 100644
--- a/drivers/ata/pata_hpt366.c
+++ b/drivers/ata/pata_hpt366.c
@@ -342,7 +342,6 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
342 const struct ata_port_info *ppi[] = { &info_hpt366, NULL }; 342 const struct ata_port_info *ppi[] = { &info_hpt366, NULL };
343 343
344 void *hpriv = NULL; 344 void *hpriv = NULL;
345 u32 class_rev;
346 u32 reg1; 345 u32 reg1;
347 int rc; 346 int rc;
348 347
@@ -350,13 +349,10 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
350 if (rc) 349 if (rc)
351 return rc; 350 return rc;
352 351
353 pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
354 class_rev &= 0xFF;
355
356 /* May be a later chip in disguise. Check */ 352 /* May be a later chip in disguise. Check */
357 /* Newer chips are not in the HPT36x driver. Ignore them */ 353 /* Newer chips are not in the HPT36x driver. Ignore them */
358 if (class_rev > 2) 354 if (dev->revision > 2)
359 return -ENODEV; 355 return -ENODEV;
360 356
361 hpt36x_init_chipset(dev); 357 hpt36x_init_chipset(dev);
362 358