diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-10-31 03:42:07 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-20 18:22:31 -0400 |
commit | 8349304d12cf1313bdbd6eb2083701d86809be24 (patch) | |
tree | 599d43c202cda35b80966d9f364559484ca4145a /drivers/isdn/hisax/bkm_a8.c | |
parent | d38c8475b4f3a684ac673dcedc88ffdb17b74882 (diff) | |
download | blackbird-op-linux-8349304d12cf1313bdbd6eb2083701d86809be24.tar.gz blackbird-op-linux-8349304d12cf1313bdbd6eb2083701d86809be24.zip |
[ISDN] Hisax: eliminate many unnecessary references to CardType[]
For the vast majority of CardType[card->typ] uses (but not all!),
the string is constant for each driver. Therefore, we may replace
CardType[card->typ] with the actual string describing the driver, making
each printk() a bit more simple.
This also has the nice, intended side effect of greatly reducing
external references to hisax global CardType[]. This will be of value
once the ISDN drivers are converted to the ISA/PCI/PNP hotplug APIs.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/isdn/hisax/bkm_a8.c')
-rw-r--r-- | drivers/isdn/hisax/bkm_a8.c | 31 |
1 files changed, 13 insertions, 18 deletions
diff --git a/drivers/isdn/hisax/bkm_a8.c b/drivers/isdn/hisax/bkm_a8.c index 99ef3b43fcd7..e1ff4717a8a6 100644 --- a/drivers/isdn/hisax/bkm_a8.c +++ b/drivers/isdn/hisax/bkm_a8.c @@ -22,8 +22,6 @@ #define ATTEMPT_PCI_REMAPPING /* Required for PLX rev 1 */ -extern const char *CardType[]; - static const char sct_quadro_revision[] = "$Revision: 1.22.2.4 $"; static const char *sct_quadro_subtypes[] = @@ -181,8 +179,7 @@ bkm_interrupt_ipac(int intno, void *dev_id) goto Start_IPAC; } if (!icnt) - printk(KERN_WARNING "HiSax: %s (%s) IRQ LOOP\n", - CardType[cs->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s) IRQ LOOP\n", sct_quadro_subtypes[cs->subtyp]); writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xFF); writereg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_MASK, 0xC0); @@ -296,8 +293,8 @@ setup_sct_quadro(struct IsdnCard *card) if (card->para[0] >= SCT_1 && card->para[0] <= SCT_4) cs->subtyp = card->para[0]; else { - printk(KERN_WARNING "HiSax: %s: Invalid subcontroller in configuration, default to 1\n", - CardType[card->typ]); + printk(KERN_WARNING "HiSax: Scitel Quadro: Invalid " + "subcontroller in configuration, default to 1\n"); return (0); } if ((cs->subtyp != SCT_1) && ((sub_sys_id != PCI_DEVICE_ID_BERKOM_SCITEL_QUADRO) || @@ -322,16 +319,16 @@ setup_sct_quadro(struct IsdnCard *card) } } if (!found) { - printk(KERN_WARNING "HiSax: %s (%s): Card not found\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s): " + "Card not found\n", sct_quadro_subtypes[cs->subtyp]); return (0); } #ifdef ATTEMPT_PCI_REMAPPING /* HACK: PLX revision 1 bug: PLX address bit 7 must not be set */ if ((pci_ioaddr1 & 0x80) && (dev_a8->revision == 1)) { - printk(KERN_WARNING "HiSax: %s (%s): PLX rev 1, remapping required!\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s): " + "PLX rev 1, remapping required!\n", sct_quadro_subtypes[cs->subtyp]); /* Restart PCI negotiation */ pci_write_config_dword(dev_a8, PCI_BASE_ADDRESS_1, (u_int) - 1); @@ -344,8 +341,7 @@ setup_sct_quadro(struct IsdnCard *card) #endif /* End HACK */ } if (!pci_irq) { /* IRQ range check ?? */ - printk(KERN_WARNING "HiSax: %s (%s): No IRQ\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s): No IRQ\n", sct_quadro_subtypes[cs->subtyp]); return (0); } @@ -355,8 +351,8 @@ setup_sct_quadro(struct IsdnCard *card) pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_4, &pci_ioaddr4); pci_read_config_dword(dev_a8, PCI_BASE_ADDRESS_5, &pci_ioaddr5); if (!pci_ioaddr1 || !pci_ioaddr2 || !pci_ioaddr3 || !pci_ioaddr4 || !pci_ioaddr5) { - printk(KERN_WARNING "HiSax: %s (%s): No IO base address(es)\n", - CardType[card->typ], + printk(KERN_WARNING "HiSax: Scitel Quadro (%s): " + "No IO base address(es)\n", sct_quadro_subtypes[cs->subtyp]); return (0); } @@ -411,8 +407,8 @@ setup_sct_quadro(struct IsdnCard *card) /* For isac and hscx data path */ cs->hw.ax.data_adr = cs->hw.ax.base + 4; - printk(KERN_INFO "HiSax: %s (%s) configured at 0x%.4lX, 0x%.4lX, 0x%.4lX and IRQ %d\n", - CardType[card->typ], + printk(KERN_INFO "HiSax: Scitel Quadro (%s) configured at " + "0x%.4lX, 0x%.4lX, 0x%.4lX and IRQ %d\n", sct_quadro_subtypes[cs->subtyp], cs->hw.ax.plx_adr, cs->hw.ax.base, @@ -432,8 +428,7 @@ setup_sct_quadro(struct IsdnCard *card) cs->cardmsg = &BKM_card_msg; cs->irq_func = &bkm_interrupt_ipac; - printk(KERN_INFO "HiSax: %s (%s): IPAC Version %d\n", - CardType[card->typ], + printk(KERN_INFO "HiSax: Scitel Quadro (%s): IPAC Version %d\n", sct_quadro_subtypes[cs->subtyp], readreg(cs->hw.ax.base, cs->hw.ax.data_adr, IPAC_ID)); return (1); |