Commit 1e0aa9ad authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Len Brown

PNP: fix up after Lindent

More manual fixups after Lindent.  No functional change.
Signed-off-by: default avatarBjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: default avatarAdam Belay <abelay@novell.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent b377fd39
...@@ -25,13 +25,13 @@ static const struct pnp_card_device_id *match_card(struct pnp_card_driver *drv, ...@@ -25,13 +25,13 @@ static const struct pnp_card_device_id *match_card(struct pnp_card_driver *drv,
int found; int found;
struct pnp_dev *dev; struct pnp_dev *dev;
if (i == PNP_MAX_DEVICES if (i == PNP_MAX_DEVICES ||
|| !*drv_id->devs[i].id) !*drv_id->devs[i].id)
return drv_id; return drv_id;
found = 0; found = 0;
card_for_each_dev(card, dev) { card_for_each_dev(card, dev) {
if (compare_pnp_id if (compare_pnp_id(dev->id,
(dev->id, drv_id->devs[i].id)) { drv_id->devs[i].id)) {
found = 1; found = 1;
break; break;
} }
...@@ -183,7 +183,7 @@ static int pnp_interface_attach_card(struct pnp_card *card) ...@@ -183,7 +183,7 @@ static int pnp_interface_attach_card(struct pnp_card *card)
return 0; return 0;
err_name: err_name:
device_remove_file(&card->dev, &dev_attr_name); device_remove_file(&card->dev, &dev_attr_name);
return rc; return rc;
} }
...@@ -321,10 +321,10 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, ...@@ -321,10 +321,10 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
pos = pos->next; pos = pos->next;
} }
done: done:
return NULL; return NULL;
found: found:
dev->card_link = clink; dev->card_link = clink;
dev->dev.driver = &drv->link.driver; dev->dev.driver = &drv->link.driver;
if (pnp_bus_type.probe(&dev->dev)) if (pnp_bus_type.probe(&dev->dev))
...@@ -334,7 +334,7 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink, ...@@ -334,7 +334,7 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
return dev; return dev;
err_out: err_out:
dev->dev.driver = NULL; dev->dev.driver = NULL;
dev->card_link = NULL; dev->card_link = NULL;
return NULL; return NULL;
......
...@@ -118,7 +118,7 @@ static int pnp_device_probe(struct device *dev) ...@@ -118,7 +118,7 @@ static int pnp_device_probe(struct device *dev)
goto fail; goto fail;
return error; return error;
fail: fail:
pnp_device_detach(pnp_dev); pnp_device_detach(pnp_dev);
return error; return error;
} }
......
...@@ -459,7 +459,8 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr, ...@@ -459,7 +459,8 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr,
up(&pnp_res_mutex); up(&pnp_res_mutex);
goto done; goto done;
} }
done:
done:
if (retval < 0) if (retval < 0)
return retval; return retval;
return count; return count;
...@@ -499,10 +500,10 @@ int pnp_interface_attach_device(struct pnp_dev *dev) ...@@ -499,10 +500,10 @@ int pnp_interface_attach_device(struct pnp_dev *dev)
return 0; return 0;
err_res: err_res:
device_remove_file(&dev->dev, &dev_attr_resources); device_remove_file(&dev->dev, &dev_attr_resources);
err_opt: err_opt:
device_remove_file(&dev->dev, &dev_attr_options); device_remove_file(&dev->dev, &dev_attr_options);
err: err:
return rc; return rc;
} }
...@@ -335,7 +335,7 @@ static int __init isapnp_isolate(void) ...@@ -335,7 +335,7 @@ static int __init isapnp_isolate(void)
} else if (iteration > 1) { } else if (iteration > 1) {
break; break;
} }
__next: __next:
if (csn == 255) if (csn == 255)
break; break;
checksum = 0x6a; checksum = 0x6a;
...@@ -733,7 +733,7 @@ static int __init isapnp_create_device(struct pnp_card *card, ...@@ -733,7 +733,7 @@ static int __init isapnp_create_device(struct pnp_card *card,
"isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n", "isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n",
type, dev->number, card->number); type, dev->number, card->number);
} }
__skip: __skip:
if (size > 0) if (size > 0)
isapnp_skip_bytes(size); isapnp_skip_bytes(size);
} }
...@@ -788,7 +788,7 @@ static void __init isapnp_parse_resource_map(struct pnp_card *card) ...@@ -788,7 +788,7 @@ static void __init isapnp_parse_resource_map(struct pnp_card *card)
"isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n", "isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n",
type, card->number); type, card->number);
} }
__skip: __skip:
if (size > 0) if (size > 0)
isapnp_skip_bytes(size); isapnp_skip_bytes(size);
} }
...@@ -940,9 +940,6 @@ EXPORT_SYMBOL(isapnp_protocol); ...@@ -940,9 +940,6 @@ EXPORT_SYMBOL(isapnp_protocol);
EXPORT_SYMBOL(isapnp_present); EXPORT_SYMBOL(isapnp_present);
EXPORT_SYMBOL(isapnp_cfg_begin); EXPORT_SYMBOL(isapnp_cfg_begin);
EXPORT_SYMBOL(isapnp_cfg_end); EXPORT_SYMBOL(isapnp_cfg_end);
#if 0
EXPORT_SYMBOL(isapnp_read_byte);
#endif
EXPORT_SYMBOL(isapnp_write_byte); EXPORT_SYMBOL(isapnp_write_byte);
static int isapnp_read_resources(struct pnp_dev *dev, static int isapnp_read_resources(struct pnp_dev *dev,
...@@ -993,6 +990,7 @@ static int isapnp_get_resources(struct pnp_dev *dev, ...@@ -993,6 +990,7 @@ static int isapnp_get_resources(struct pnp_dev *dev,
struct pnp_resource_table *res) struct pnp_resource_table *res)
{ {
int ret; int ret;
pnp_init_resource_table(res); pnp_init_resource_table(res);
isapnp_cfg_begin(dev->card->number, dev->number); isapnp_cfg_begin(dev->card->number, dev->number);
ret = isapnp_read_resources(dev, res); ret = isapnp_read_resources(dev, res);
...@@ -1148,13 +1146,12 @@ static int __init isapnp_init(void) ...@@ -1148,13 +1146,12 @@ static int __init isapnp_init(void)
} }
} }
} }
if (cards) { if (cards)
printk(KERN_INFO printk(KERN_INFO
"isapnp: %i Plug & Play card%s detected total\n", cards, "isapnp: %i Plug & Play card%s detected total\n", cards,
cards > 1 ? "s" : ""); cards > 1 ? "s" : "");
} else { else
printk(KERN_INFO "isapnp: No Plug & Play card found\n"); printk(KERN_INFO "isapnp: No Plug & Play card found\n");
}
isapnp_proc_init(); isapnp_proc_init();
return 0; return 0;
......
...@@ -390,7 +390,7 @@ static int pnp_assign_resources(struct pnp_dev *dev, int depnum) ...@@ -390,7 +390,7 @@ static int pnp_assign_resources(struct pnp_dev *dev, int depnum)
up(&pnp_res_mutex); up(&pnp_res_mutex);
return 1; return 1;
fail: fail:
pnp_clean_resource_table(&dev->res); pnp_clean_resource_table(&dev->res);
up(&pnp_res_mutex); up(&pnp_res_mutex);
return 0; return 0;
...@@ -444,7 +444,7 @@ int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, ...@@ -444,7 +444,7 @@ int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res,
kfree(bak); kfree(bak);
return 0; return 0;
fail: fail:
dev->res = *bak; dev->res = *bak;
up(&pnp_res_mutex); up(&pnp_res_mutex);
kfree(bak); kfree(bak);
......
...@@ -248,9 +248,9 @@ static int __init pnpacpi_add_device(struct acpi_device *device) ...@@ -248,9 +248,9 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
num++; num++;
return AE_OK; return AE_OK;
err1: err1:
kfree(dev_id); kfree(dev_id);
err: err:
kfree(dev); kfree(dev);
return -EINVAL; return -EINVAL;
} }
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
static int irq_flags(int triggering, int polarity) static int irq_flags(int triggering, int polarity)
{ {
int flag; int flag;
if (triggering == ACPI_LEVEL_SENSITIVE) { if (triggering == ACPI_LEVEL_SENSITIVE) {
if (polarity == ACPI_ACTIVE_LOW) if (polarity == ACPI_ACTIVE_LOW)
flag = IORESOURCE_IRQ_LOWLEVEL; flag = IORESOURCE_IRQ_LOWLEVEL;
......
...@@ -591,6 +591,7 @@ subsys_initcall(pnpbios_init); ...@@ -591,6 +591,7 @@ subsys_initcall(pnpbios_init);
static int __init pnpbios_thread_init(void) static int __init pnpbios_thread_init(void)
{ {
struct task_struct *task; struct task_struct *task;
#if defined(CONFIG_PPC_MERGE) #if defined(CONFIG_PPC_MERGE)
if (check_legacy_ioport(PNPBIOS_BASE)) if (check_legacy_ioport(PNPBIOS_BASE))
return 0; return 0;
......
...@@ -212,7 +212,7 @@ static int proc_write_node(struct file *file, const char __user * buf, ...@@ -212,7 +212,7 @@ static int proc_write_node(struct file *file, const char __user * buf,
goto out; goto out;
} }
ret = count; ret = count;
out: out:
kfree(node); kfree(node);
return ret; return ret;
} }
......
...@@ -238,7 +238,7 @@ static unsigned char *pnpbios_parse_allocated_resource_data(unsigned char *p, ...@@ -238,7 +238,7 @@ static unsigned char *pnpbios_parse_allocated_resource_data(unsigned char *p,
break; break;
default: /* an unkown tag */ default: /* an unkown tag */
len_err: len_err:
printk(KERN_ERR printk(KERN_ERR
"PnPBIOS: Unknown tag '0x%x', length '%d'.\n", "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
tag, len); tag, len);
...@@ -298,6 +298,7 @@ static void pnpbios_parse_fixed_mem32_option(unsigned char *p, int size, ...@@ -298,6 +298,7 @@ static void pnpbios_parse_fixed_mem32_option(unsigned char *p, int size,
struct pnp_option *option) struct pnp_option *option)
{ {
struct pnp_mem *mem; struct pnp_mem *mem;
mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL); mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
if (!mem) if (!mem)
return; return;
...@@ -468,7 +469,7 @@ static unsigned char *pnpbios_parse_resource_option_data(unsigned char *p, ...@@ -468,7 +469,7 @@ static unsigned char *pnpbios_parse_resource_option_data(unsigned char *p,
return p + 2; return p + 2;
default: /* an unkown tag */ default: /* an unkown tag */
len_err: len_err:
printk(KERN_ERR printk(KERN_ERR
"PnPBIOS: Unknown tag '0x%x', length '%d'.\n", "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
tag, len); tag, len);
...@@ -562,7 +563,7 @@ static unsigned char *pnpbios_parse_compatible_ids(unsigned char *p, ...@@ -562,7 +563,7 @@ static unsigned char *pnpbios_parse_compatible_ids(unsigned char *p,
break; break;
default: /* an unkown tag */ default: /* an unkown tag */
len_err: len_err:
printk(KERN_ERR printk(KERN_ERR
"PnPBIOS: Unknown tag '0x%x', length '%d'.\n", "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
tag, len); tag, len);
...@@ -756,7 +757,7 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p, ...@@ -756,7 +757,7 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
break; break;
default: /* an unkown tag */ default: /* an unkown tag */
len_err: len_err:
printk(KERN_ERR printk(KERN_ERR
"PnPBIOS: Unknown tag '0x%x', length '%d'.\n", "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
tag, len); tag, len);
......
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