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/niccy.c | |
parent | d38c8475b4f3a684ac673dcedc88ffdb17b74882 (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.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c index bd9921128aa8..421b8e6763d7 100644 --- a/drivers/isdn/hisax/niccy.c +++ b/drivers/isdn/hisax/niccy.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/pci.h> | 21 | #include <linux/pci.h> |
22 | #include <linux/isapnp.h> | 22 | #include <linux/isapnp.h> |
23 | 23 | ||
24 | extern const char *CardType[]; | ||
25 | static const char *niccy_revision = "$Revision: 1.21.2.4 $"; | 24 | static const char *niccy_revision = "$Revision: 1.21.2.4 $"; |
26 | 25 | ||
27 | #define byteout(addr,val) outb(val,addr) | 26 | #define byteout(addr,val) outb(val,addr) |
@@ -284,14 +283,14 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
284 | cs->subtyp = NICCY_PNP; | 283 | cs->subtyp = NICCY_PNP; |
285 | cs->irq = card->para[0]; | 284 | cs->irq = card->para[0]; |
286 | if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) { | 285 | if (!request_region(cs->hw.niccy.isac, 2, "niccy data")) { |
287 | printk(KERN_WARNING "HiSax: %s data port %x-%x " | 286 | printk(KERN_WARNING "HiSax: NICCY data port %x-%x " |
288 | "already in use\n", CardType[card->typ], | 287 | "already in use\n", |
289 | cs->hw.niccy.isac, cs->hw.niccy.isac + 1); | 288 | cs->hw.niccy.isac, cs->hw.niccy.isac + 1); |
290 | return 0; | 289 | return 0; |
291 | } | 290 | } |
292 | if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) { | 291 | if (!request_region(cs->hw.niccy.isac_ale, 2, "niccy addr")) { |
293 | printk(KERN_WARNING "HiSax: %s address port %x-%x " | 292 | printk(KERN_WARNING "HiSax: NICCY address port %x-%x " |
294 | "already in use\n", CardType[card->typ], | 293 | "already in use\n", |
295 | cs->hw.niccy.isac_ale, | 294 | cs->hw.niccy.isac_ale, |
296 | cs->hw.niccy.isac_ale + 1); | 295 | cs->hw.niccy.isac_ale + 1); |
297 | release_region(cs->hw.niccy.isac, 2); | 296 | release_region(cs->hw.niccy.isac, 2); |
@@ -339,15 +338,13 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
339 | cs->hw.niccy.hscx_ale = pci_ioaddr + HSCX_PCI_ADDR; | 338 | cs->hw.niccy.hscx_ale = pci_ioaddr + HSCX_PCI_ADDR; |
340 | if (!request_region(cs->hw.niccy.isac, 4, "niccy")) { | 339 | if (!request_region(cs->hw.niccy.isac, 4, "niccy")) { |
341 | printk(KERN_WARNING | 340 | printk(KERN_WARNING |
342 | "HiSax: %s data port %x-%x already in use\n", | 341 | "HiSax: NICCY data port %x-%x already in use\n", |
343 | CardType[card->typ], | ||
344 | cs->hw.niccy.isac, cs->hw.niccy.isac + 4); | 342 | cs->hw.niccy.isac, cs->hw.niccy.isac + 4); |
345 | return 0; | 343 | return 0; |
346 | } | 344 | } |
347 | if (!request_region(cs->hw.niccy.cfg_reg, 0x40, "niccy pci")) { | 345 | if (!request_region(cs->hw.niccy.cfg_reg, 0x40, "niccy pci")) { |
348 | printk(KERN_WARNING | 346 | printk(KERN_WARNING |
349 | "HiSax: %s pci port %x-%x already in use\n", | 347 | "HiSax: NICCY pci port %x-%x already in use\n", |
350 | CardType[card->typ], | ||
351 | cs->hw.niccy.cfg_reg, | 348 | cs->hw.niccy.cfg_reg, |
352 | cs->hw.niccy.cfg_reg + 0x40); | 349 | cs->hw.niccy.cfg_reg + 0x40); |
353 | release_region(cs->hw.niccy.isac, 4); | 350 | release_region(cs->hw.niccy.isac, 4); |
@@ -359,8 +356,8 @@ int __devinit setup_niccy(struct IsdnCard *card) | |||
359 | return 0; | 356 | return 0; |
360 | #endif /* CONFIG_PCI_LEGACY */ | 357 | #endif /* CONFIG_PCI_LEGACY */ |
361 | } | 358 | } |
362 | printk(KERN_INFO "HiSax: %s %s config irq:%d data:0x%X ale:0x%X\n", | 359 | printk(KERN_INFO "HiSax: NICCY %s config irq:%d data:0x%X ale:0x%X\n", |
363 | CardType[cs->typ], (cs->subtyp == 1) ? "PnP" : "PCI", | 360 | (cs->subtyp == 1) ? "PnP" : "PCI", |
364 | cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale); | 361 | cs->irq, cs->hw.niccy.isac, cs->hw.niccy.isac_ale); |
365 | setup_isac(cs); | 362 | setup_isac(cs); |
366 | cs->readisac = &ReadISAC; | 363 | cs->readisac = &ReadISAC; |