aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/atm/idt77252.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/atm/idt77252.c')
-rw-r--r--drivers/atm/idt77252.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/atm/idt77252.c b/drivers/atm/idt77252.c
index 3800bc0cb2ef..8f995ce8d73b 100644
--- a/drivers/atm/idt77252.c
+++ b/drivers/atm/idt77252.c
@@ -3679,7 +3679,6 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
3679 unsigned long membase, srambase; 3679 unsigned long membase, srambase;
3680 struct idt77252_dev *card; 3680 struct idt77252_dev *card;
3681 struct atm_dev *dev; 3681 struct atm_dev *dev;
3682 ushort revision = 0;
3683 int i, err; 3682 int i, err;
3684 3683
3685 3684
@@ -3688,19 +3687,13 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
3688 return err; 3687 return err;
3689 } 3688 }
3690 3689
3691 if (pci_read_config_word(pcidev, PCI_REVISION_ID, &revision)) {
3692 printk("idt77252-%d: can't read PCI_REVISION_ID\n", index);
3693 err = -ENODEV;
3694 goto err_out_disable_pdev;
3695 }
3696
3697 card = kzalloc(sizeof(struct idt77252_dev), GFP_KERNEL); 3690 card = kzalloc(sizeof(struct idt77252_dev), GFP_KERNEL);
3698 if (!card) { 3691 if (!card) {
3699 printk("idt77252-%d: can't allocate private data\n", index); 3692 printk("idt77252-%d: can't allocate private data\n", index);
3700 err = -ENOMEM; 3693 err = -ENOMEM;
3701 goto err_out_disable_pdev; 3694 goto err_out_disable_pdev;
3702 } 3695 }
3703 card->revision = revision; 3696 card->revision = pcidev->revision;
3704 card->index = index; 3697 card->index = index;
3705 card->pcidev = pcidev; 3698 card->pcidev = pcidev;
3706 sprintf(card->name, "idt77252-%d", card->index); 3699 sprintf(card->name, "idt77252-%d", card->index);
@@ -3762,8 +3755,8 @@ idt77252_init_one(struct pci_dev *pcidev, const struct pci_device_id *id)
3762 } 3755 }
3763 3756
3764 printk("%s: ABR SAR (Rev %c): MEM %08lx SRAM %08lx [%u KB]\n", 3757 printk("%s: ABR SAR (Rev %c): MEM %08lx SRAM %08lx [%u KB]\n",
3765 card->name, ((revision > 1) && (revision < 25)) ? 3758 card->name, ((card->revision > 1) && (card->revision < 25)) ?
3766 'A' + revision - 1 : '?', membase, srambase, 3759 'A' + card->revision - 1 : '?', membase, srambase,
3767 card->sramsize / 1024); 3760 card->sramsize / 1024);
3768 3761
3769 if (init_card(dev)) { 3762 if (init_card(dev)) {