aboutsummaryrefslogtreecommitdiff
path: root/drivers/isdn/hisax/niccy.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2007-10-31 03:42:07 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-20 18:22:31 -0400
commit8349304d12cf1313bdbd6eb2083701d86809be24 (patch)
tree599d43c202cda35b80966d9f364559484ca4145a /drivers/isdn/hisax/niccy.c
parentd38c8475b4f3a684ac673dcedc88ffdb17b74882 (diff)
[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/niccy.c')
-rw-r--r--drivers/isdn/hisax/niccy.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
index bd9921128aa..421b8e6763d 100644
--- a/drivers/isdn/hisax/niccy.c
+++ b/drivers/isdn/hisax/niccy.c
@@ -21,7 +21,6 @@
#include <linux/pci.h>
#include <linux/isapnp.h>
-extern const char *CardType[];
static const char *niccy_revision = "$Revision: 1.21.2.4 $";
#define byteout(addr,val) outb(val,addr)
@@ -284,14 +283,14 @@ int __devinit setup_niccy(struct IsdnCard *card)
cs->subtyp = NICCY_PNP;
cs->irq = card->para[0];
if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) {
- printk(KERN_WARNING "HiSax: %s data port %x-%x "
- "already in use\n", CardType[card->typ],
+ printk(KERN_WARNING "HiSax: NICCY data port %x-%x "
+ "already in use\n",
cs->hw.niccy.isac, cs->hw.niccy.isac + 1);
return 0;
}
if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) {
- printk(KERN_WARNING "HiSax: %s address port %x-%x "
- "already in use\n", CardType[card->typ],
+ printk(KERN_WARNING "HiSax: NICCY address port %x-%x "
+ "already in use\n",
cs->hw.niccy.isac_ale,
cs->hw.niccy.isac_ale + 1);
release_region(cs->hw.niccy.isac, 2);
@@ -339,15 +338,13 @@ int __devinit setup_niccy(struct IsdnCard *card)
cs->hw.niccy.hscx_ale = pci_ioaddr + HSCX_PCI_ADDR;
if (!request_region(cs->hw.niccy.isac, 4, "niccy")) {
printk(KERN_WARNING
- "HiSax: %s data port %x-%x already in use\n",
- CardType[card->typ],
+ "HiSax: NICCY data port %x-%x already in use\n",
cs->hw.niccy.isac, cs->hw.niccy.isac + 4);
return 0;
}
if (!request_region(cs->hw.niccy.cfg_reg, 0x40, "niccy pci")) {
printk(KERN_WARNING
- "HiSax: %s pci port %x-%x already in use\n",
- CardType[card->typ],
+ "HiSax: NICCY pci port %x-%x already in use\n",
cs->hw.niccy.cfg_reg,
cs->hw.niccy.cfg_reg + 0x40);
release_region(cs->hw.niccy.isac, 4);
@@ -359,8 +356,8 @@ int __devinit setup_niccy(struct IsdnCard *card)
return 0;
#endif /* CONFIG_PCI_LEGACY */
}
- printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n",
- CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI",
+ printk(KERN_INFO "HiSax: NICCY %s config irq:%d data:0x%X ale:0x%X\n",
+ (cs->subtyp == 1) ? "PnP" : "PCI",
cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale);
setup_isac(cs);
cs->readisac = &ReadISAC;