More manual fixups after Lindent. No functional change.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Adam Belay <abelay@novell.com>
Signed-off-by: Len Brown <len.brown@intel.com>
int found;
struct pnp_dev *dev;
- if (i == PNP_MAX_DEVICES
- || !*drv_id->devs[i].id)
+ if (i == PNP_MAX_DEVICES ||
+ !*drv_id->devs[i].id)
return drv_id;
found = 0;
card_for_each_dev(card, dev) {
- if (compare_pnp_id
- (dev->id, drv_id->devs[i].id)) {
+ if (compare_pnp_id(dev->id,
+ drv_id->devs[i].id)) {
found = 1;
break;
}
return 0;
- err_name:
+err_name:
device_remove_file(&card->dev, &dev_attr_name);
return rc;
}
pos = pos->next;
}
- done:
+done:
return NULL;
- found:
+found:
dev->card_link = clink;
dev->dev.driver = &drv->link.driver;
if (pnp_bus_type.probe(&dev->dev))
return dev;
- err_out:
+err_out:
dev->dev.driver = NULL;
dev->card_link = NULL;
return NULL;
goto fail;
return error;
- fail:
+fail:
pnp_device_detach(pnp_dev);
return error;
}
up(&pnp_res_mutex);
goto done;
}
- done:
+
+done:
if (retval < 0)
return retval;
return count;
return 0;
- err_res:
+err_res:
device_remove_file(&dev->dev, &dev_attr_resources);
- err_opt:
+err_opt:
device_remove_file(&dev->dev, &dev_attr_options);
- err:
+err:
return rc;
}
} else if (iteration > 1) {
break;
}
- __next:
+__next:
if (csn == 255)
break;
checksum = 0x6a;
"isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n",
type, dev->number, card->number);
}
- __skip:
+__skip:
if (size > 0)
isapnp_skip_bytes(size);
}
"isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n",
type, card->number);
}
- __skip:
+__skip:
if (size > 0)
isapnp_skip_bytes(size);
}
EXPORT_SYMBOL(isapnp_present);
EXPORT_SYMBOL(isapnp_cfg_begin);
EXPORT_SYMBOL(isapnp_cfg_end);
-#if 0
-EXPORT_SYMBOL(isapnp_read_byte);
-#endif
EXPORT_SYMBOL(isapnp_write_byte);
static int isapnp_read_resources(struct pnp_dev *dev,
struct pnp_resource_table *res)
{
int ret;
+
pnp_init_resource_table(res);
isapnp_cfg_begin(dev->card->number, dev->number);
ret = isapnp_read_resources(dev, res);
}
}
}
- if (cards) {
+ if (cards)
printk(KERN_INFO
"isapnp: %i Plug & Play card%s detected total\n", cards,
cards > 1 ? "s" : "");
- } else {
+ else
printk(KERN_INFO "isapnp: No Plug & Play card found\n");
- }
isapnp_proc_init();
return 0;
up(&pnp_res_mutex);
return 1;
- fail:
+fail:
pnp_clean_resource_table(&dev->res);
up(&pnp_res_mutex);
return 0;
kfree(bak);
return 0;
- fail:
+fail:
dev->res = *bak;
up(&pnp_res_mutex);
kfree(bak);
num++;
return AE_OK;
- err1:
+err1:
kfree(dev_id);
- err:
+err:
kfree(dev);
return -EINVAL;
}
static int irq_flags(int triggering, int polarity)
{
int flag;
+
if (triggering == ACPI_LEVEL_SENSITIVE) {
if (polarity == ACPI_ACTIVE_LOW)
flag = IORESOURCE_IRQ_LOWLEVEL;
static int __init pnpbios_thread_init(void)
{
struct task_struct *task;
+
#if defined(CONFIG_PPC_MERGE)
if (check_legacy_ioport(PNPBIOS_BASE))
return 0;
goto out;
}
ret = count;
- out:
+out:
kfree(node);
return ret;
}
break;
default: /* an unkown tag */
- len_err:
+len_err:
printk(KERN_ERR
"PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
tag, len);
struct pnp_option *option)
{
struct pnp_mem *mem;
+
mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
if (!mem)
return;
return p + 2;
default: /* an unkown tag */
- len_err:
+len_err:
printk(KERN_ERR
"PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
tag, len);
break;
default: /* an unkown tag */
- len_err:
+len_err:
printk(KERN_ERR
"PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
tag, len);
break;
default: /* an unkown tag */
- len_err:
+len_err:
printk(KERN_ERR
"PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
tag, len);