diff options
Diffstat (limited to 'drivers/ide/pci/hpt366.c')
-rw-r--r-- | drivers/ide/pci/hpt366.c | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 4b6bae8eee82..e9b07a97c340 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1413,11 +1413,9 @@ static int __devinit init_setup_hpt372n(struct pci_dev *dev, ide_pci_device_t *d | |||
1413 | static int __devinit init_setup_hpt371(struct pci_dev *dev, ide_pci_device_t *d) | 1413 | static int __devinit init_setup_hpt371(struct pci_dev *dev, ide_pci_device_t *d) |
1414 | { | 1414 | { |
1415 | struct hpt_info *info; | 1415 | struct hpt_info *info; |
1416 | u8 rev = 0, mcr1 = 0; | 1416 | u8 mcr1 = 0; |
1417 | 1417 | ||
1418 | pci_read_config_byte(dev, PCI_REVISION_ID, &rev); | 1418 | if (dev->revision > 1) { |
1419 | |||
1420 | if (rev > 1) { | ||
1421 | d->name = "HPT371N"; | 1419 | d->name = "HPT371N"; |
1422 | 1420 | ||
1423 | info = &hpt371n; | 1421 | info = &hpt371n; |
@@ -1442,11 +1440,8 @@ static int __devinit init_setup_hpt371(struct pci_dev *dev, ide_pci_device_t *d) | |||
1442 | static int __devinit init_setup_hpt372a(struct pci_dev *dev, ide_pci_device_t *d) | 1440 | static int __devinit init_setup_hpt372a(struct pci_dev *dev, ide_pci_device_t *d) |
1443 | { | 1441 | { |
1444 | struct hpt_info *info; | 1442 | struct hpt_info *info; |
1445 | u8 rev = 0; | ||
1446 | |||
1447 | pci_read_config_byte(dev, PCI_REVISION_ID, &rev); | ||
1448 | 1443 | ||
1449 | if (rev > 1) { | 1444 | if (dev->revision > 1) { |
1450 | d->name = "HPT372N"; | 1445 | d->name = "HPT372N"; |
1451 | 1446 | ||
1452 | info = &hpt372n; | 1447 | info = &hpt372n; |
@@ -1460,11 +1455,8 @@ static int __devinit init_setup_hpt372a(struct pci_dev *dev, ide_pci_device_t *d | |||
1460 | static int __devinit init_setup_hpt302(struct pci_dev *dev, ide_pci_device_t *d) | 1455 | static int __devinit init_setup_hpt302(struct pci_dev *dev, ide_pci_device_t *d) |
1461 | { | 1456 | { |
1462 | struct hpt_info *info; | 1457 | struct hpt_info *info; |
1463 | u8 rev = 0; | ||
1464 | 1458 | ||
1465 | pci_read_config_byte(dev, PCI_REVISION_ID, &rev); | 1459 | if (dev->revision > 1) { |
1466 | |||
1467 | if (rev > 1) { | ||
1468 | d->name = "HPT302N"; | 1460 | d->name = "HPT302N"; |
1469 | 1461 | ||
1470 | info = &hpt302n; | 1462 | info = &hpt302n; |
@@ -1478,7 +1470,7 @@ static int __devinit init_setup_hpt302(struct pci_dev *dev, ide_pci_device_t *d) | |||
1478 | static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d) | 1470 | static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d) |
1479 | { | 1471 | { |
1480 | struct pci_dev *dev2; | 1472 | struct pci_dev *dev2; |
1481 | u8 rev = 0; | 1473 | u8 rev = dev->revision; |
1482 | static char *chipset_names[] = { "HPT366", "HPT366", "HPT368", | 1474 | static char *chipset_names[] = { "HPT366", "HPT366", "HPT368", |
1483 | "HPT370", "HPT370A", "HPT372", | 1475 | "HPT370", "HPT370A", "HPT372", |
1484 | "HPT372N" }; | 1476 | "HPT372N" }; |
@@ -1489,8 +1481,6 @@ static int __devinit init_setup_hpt366(struct pci_dev *dev, ide_pci_device_t *d) | |||
1489 | if (PCI_FUNC(dev->devfn) & 1) | 1481 | if (PCI_FUNC(dev->devfn) & 1) |
1490 | return -ENODEV; | 1482 | return -ENODEV; |
1491 | 1483 | ||
1492 | pci_read_config_byte(dev, PCI_REVISION_ID, &rev); | ||
1493 | |||
1494 | switch (rev) { | 1484 | switch (rev) { |
1495 | case 0: | 1485 | case 0: |
1496 | case 1: | 1486 | case 1: |