Commit f2c2e878 authored by Mika Kukkonen's avatar Mika Kukkonen Committed by Linus Torvalds

[PATCH] Fix drivers/isdn/hisax/avm_pci.c build warning when !CONFIG_ISAPNP

  CC [M]  drivers/isdn/hisax/avm_pci.o
drivers/isdn/hisax/avm_pci.c: In function `setup_avm_pcipnp':
drivers/isdn/hisax/avm_pci.c:817: warning: label `ready' defined but not used

Patch is big because I replaced the '} else { ...  }' with 'goto ready; }'
and so had to remove one level of indentation from code.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 51b9cfe9
...@@ -752,70 +752,70 @@ setup_avm_pcipnp(struct IsdnCard *card) ...@@ -752,70 +752,70 @@ setup_avm_pcipnp(struct IsdnCard *card)
cs->hw.avm.cfg_reg = card->para[1]; cs->hw.avm.cfg_reg = card->para[1];
cs->irq = card->para[0]; cs->irq = card->para[0];
cs->subtyp = AVM_FRITZ_PNP; cs->subtyp = AVM_FRITZ_PNP;
} else { goto ready;
}
#ifdef __ISAPNP__ #ifdef __ISAPNP__
if (isapnp_present()) { if (isapnp_present()) {
struct pnp_dev *pnp_avm_d = NULL; struct pnp_dev *pnp_avm_d = NULL;
if ((pnp_avm_c = pnp_find_card( if ((pnp_avm_c = pnp_find_card(
ISAPNP_VENDOR('A', 'V', 'M'),
ISAPNP_FUNCTION(0x0900), pnp_avm_c))) {
if ((pnp_avm_d = pnp_find_dev(pnp_avm_c,
ISAPNP_VENDOR('A', 'V', 'M'), ISAPNP_VENDOR('A', 'V', 'M'),
ISAPNP_FUNCTION(0x0900), pnp_avm_c))) { ISAPNP_FUNCTION(0x0900), pnp_avm_d))) {
if ((pnp_avm_d = pnp_find_dev(pnp_avm_c, int err;
ISAPNP_VENDOR('A', 'V', 'M'),
ISAPNP_FUNCTION(0x0900), pnp_avm_d))) { pnp_disable_dev(pnp_avm_d);
int err; err = pnp_activate_dev(pnp_avm_d);
if (err<0) {
pnp_disable_dev(pnp_avm_d); printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n",
err = pnp_activate_dev(pnp_avm_d); __FUNCTION__, err);
if (err<0) { return(0);
printk(KERN_WARNING "%s: pnp_activate_dev ret(%d)\n", }
__FUNCTION__, err); cs->hw.avm.cfg_reg =
return(0); pnp_port_start(pnp_avm_d, 0);
} cs->irq = pnp_irq(pnp_avm_d, 0);
cs->hw.avm.cfg_reg = if (!cs->irq) {
pnp_port_start(pnp_avm_d, 0); printk(KERN_ERR "FritzPnP:No IRQ\n");
cs->irq = pnp_irq(pnp_avm_d, 0); return(0);
if (!cs->irq) {
printk(KERN_ERR "FritzPnP:No IRQ\n");
return(0);
}
if (!cs->hw.avm.cfg_reg) {
printk(KERN_ERR "FritzPnP:No IO address\n");
return(0);
}
cs->subtyp = AVM_FRITZ_PNP;
goto ready;
} }
if (!cs->hw.avm.cfg_reg) {
printk(KERN_ERR "FritzPnP:No IO address\n");
return(0);
}
cs->subtyp = AVM_FRITZ_PNP;
goto ready;
} }
} else {
printk(KERN_INFO "FritzPnP: no ISA PnP present\n");
} }
} else {
printk(KERN_INFO "FritzPnP: no ISA PnP present\n");
}
#endif #endif
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
if ((dev_avm = pci_find_device(PCI_VENDOR_ID_AVM, if ((dev_avm = pci_find_device(PCI_VENDOR_ID_AVM,
PCI_DEVICE_ID_AVM_A1, dev_avm))) { PCI_DEVICE_ID_AVM_A1, dev_avm))) {
cs->irq = dev_avm->irq; cs->irq = dev_avm->irq;
if (!cs->irq) { if (!cs->irq) {
printk(KERN_ERR "FritzPCI: No IRQ for PCI card found\n"); printk(KERN_ERR "FritzPCI: No IRQ for PCI card found\n");
return(0); return(0);
} }
if (pci_enable_device(dev_avm)) if (pci_enable_device(dev_avm))
return(0); return(0);
cs->hw.avm.cfg_reg = pci_resource_start(dev_avm, 1); cs->hw.avm.cfg_reg = pci_resource_start(dev_avm, 1);
if (!cs->hw.avm.cfg_reg) { if (!cs->hw.avm.cfg_reg) {
printk(KERN_ERR "FritzPCI: No IO-Adr for PCI card found\n"); printk(KERN_ERR "FritzPCI: No IO-Adr for PCI card found\n");
return(0);
}
cs->subtyp = AVM_FRITZ_PCI;
} else {
printk(KERN_WARNING "FritzPCI: No PCI card found\n");
return(0); return(0);
} }
cs->irq_flags |= SA_SHIRQ; cs->subtyp = AVM_FRITZ_PCI;
} else {
printk(KERN_WARNING "FritzPCI: No PCI card found\n");
return(0);
}
cs->irq_flags |= SA_SHIRQ;
#else #else
printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n"); printk(KERN_WARNING "FritzPCI: NO_PCI_BIOS\n");
return (0); return (0);
#endif /* CONFIG_PCI */ #endif /* CONFIG_PCI */
}
ready: ready:
cs->hw.avm.isac = cs->hw.avm.cfg_reg + 0x10; cs->hw.avm.isac = cs->hw.avm.cfg_reg + 0x10;
if (!request_region(cs->hw.avm.cfg_reg, 32, if (!request_region(cs->hw.avm.cfg_reg, 32,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment