ISDN: ARRAY_SIZE changes
These changes were a direct result of using a semantic patch More information can be found at http://www.emn.fr/x-info/coccinelle/ Modified some of the changes to avoid the extra define. Signed-off-by: Stoyan Gaydarov <sgayda2@uiuc.edu> Signed-off-by: Karsten Keil <keil@b1-systems.de>
This commit is contained in:
@@ -23,7 +23,6 @@ static unsigned short act2000_isa_ports[] =
|
||||
0x0200, 0x0240, 0x0280, 0x02c0, 0x0300, 0x0340, 0x0380,
|
||||
0xcfe0, 0xcfa0, 0xcf60, 0xcf20, 0xcee0, 0xcea0, 0xce60,
|
||||
};
|
||||
#define ISA_NRPORTS (sizeof(act2000_isa_ports)/sizeof(unsigned short))
|
||||
|
||||
static act2000_card *cards = (act2000_card *) NULL;
|
||||
|
||||
@@ -686,21 +685,21 @@ act2000_addcard(int bus, int port, int irq, char *id)
|
||||
* This may result in more than one card detected.
|
||||
*/
|
||||
switch (bus) {
|
||||
case ACT2000_BUS_ISA:
|
||||
for (i = 0; i < ISA_NRPORTS; i++)
|
||||
if (act2000_isa_detect(act2000_isa_ports[i])) {
|
||||
printk(KERN_INFO
|
||||
"act2000: Detected ISA card at port 0x%x\n",
|
||||
act2000_isa_ports[i]);
|
||||
act2000_alloccard(bus, act2000_isa_ports[i], irq, id);
|
||||
}
|
||||
break;
|
||||
case ACT2000_BUS_MCA:
|
||||
case ACT2000_BUS_PCMCIA:
|
||||
default:
|
||||
printk(KERN_WARNING
|
||||
"act2000: addcard: Invalid BUS type %d\n",
|
||||
bus);
|
||||
case ACT2000_BUS_ISA:
|
||||
for (i = 0; i < ARRAY_SIZE(act2000_isa_ports); i++)
|
||||
if (act2000_isa_detect(act2000_isa_ports[i])) {
|
||||
printk(KERN_INFO "act2000: Detected "
|
||||
"ISA card at port 0x%x\n",
|
||||
act2000_isa_ports[i]);
|
||||
act2000_alloccard(bus,
|
||||
act2000_isa_ports[i], irq, id);
|
||||
}
|
||||
break;
|
||||
case ACT2000_BUS_MCA:
|
||||
case ACT2000_BUS_PCMCIA:
|
||||
default:
|
||||
printk(KERN_WARNING
|
||||
"act2000: addcard: Invalid BUS type %d\n", bus);
|
||||
}
|
||||
}
|
||||
if (!cards)
|
||||
|
Reference in New Issue
Block a user