aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/pnp/card.c16
-rw-r--r--drivers/pnp/driver.c2
-rw-r--r--drivers/pnp/interface.c9
-rw-r--r--drivers/pnp/isapnp/core.c15
-rw-r--r--drivers/pnp/manager.c4
-rw-r--r--drivers/pnp/pnpacpi/core.c4
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c1
-rw-r--r--drivers/pnp/pnpbios/core.c1
-rw-r--r--drivers/pnp/pnpbios/proc.c2
-rw-r--r--drivers/pnp/pnpbios/rsparser.c9
10 files changed, 32 insertions, 31 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index b6a4f02b01d1..6c0440c20e31 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -25,13 +25,13 @@ static const struct pnp_card_device_id *match_card(struct pnp_card_driver *drv,
25 int found; 25 int found;
26 struct pnp_dev *dev; 26 struct pnp_dev *dev;
27 27
28 if (i == PNP_MAX_DEVICES 28 if (i == PNP_MAX_DEVICES ||
29 || !*drv_id->devs[i].id) 29 !*drv_id->devs[i].id)
30 return drv_id; 30 return drv_id;
31 found = 0; 31 found = 0;
32 card_for_each_dev(card, dev) { 32 card_for_each_dev(card, dev) {
33 if (compare_pnp_id 33 if (compare_pnp_id(dev->id,
34 (dev->id, drv_id->devs[i].id)) { 34 drv_id->devs[i].id)) {
35 found = 1; 35 found = 1;
36 break; 36 break;
37 } 37 }
@@ -183,7 +183,7 @@ static int pnp_interface_attach_card(struct pnp_card *card)
183 183
184 return 0; 184 return 0;
185 185
186 err_name: 186err_name:
187 device_remove_file(&card->dev, &dev_attr_name); 187 device_remove_file(&card->dev, &dev_attr_name);
188 return rc; 188 return rc;
189} 189}
@@ -321,10 +321,10 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
321 pos = pos->next; 321 pos = pos->next;
322 } 322 }
323 323
324 done: 324done:
325 return NULL; 325 return NULL;
326 326
327 found: 327found:
328 dev->card_link = clink; 328 dev->card_link = clink;
329 dev->dev.driver = &drv->link.driver; 329 dev->dev.driver = &drv->link.driver;
330 if (pnp_bus_type.probe(&dev->dev)) 330 if (pnp_bus_type.probe(&dev->dev))
@@ -334,7 +334,7 @@ struct pnp_dev *pnp_request_card_device(struct pnp_card_link *clink,
334 334
335 return dev; 335 return dev;
336 336
337 err_out: 337err_out:
338 dev->dev.driver = NULL; 338 dev->dev.driver = NULL;
339 dev->card_link = NULL; 339 dev->card_link = NULL;
340 return NULL; 340 return NULL;
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 30b8f6f3258a..9be01b0433b9 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -118,7 +118,7 @@ static int pnp_device_probe(struct device *dev)
118 goto fail; 118 goto fail;
119 return error; 119 return error;
120 120
121 fail: 121fail:
122 pnp_device_detach(pnp_dev); 122 pnp_device_detach(pnp_dev);
123 return error; 123 return error;
124} 124}
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c
index fe6684e13e82..a0cfb75bbb8d 100644
--- a/drivers/pnp/interface.c
+++ b/drivers/pnp/interface.c
@@ -459,7 +459,8 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr,
459 up(&pnp_res_mutex); 459 up(&pnp_res_mutex);
460 goto done; 460 goto done;
461 } 461 }
462 done: 462
463done:
463 if (retval < 0) 464 if (retval < 0)
464 return retval; 465 return retval;
465 return count; 466 return count;
@@ -499,10 +500,10 @@ int pnp_interface_attach_device(struct pnp_dev *dev)
499 500
500 return 0; 501 return 0;
501 502
502 err_res: 503err_res:
503 device_remove_file(&dev->dev, &dev_attr_resources); 504 device_remove_file(&dev->dev, &dev_attr_resources);
504 err_opt: 505err_opt:
505 device_remove_file(&dev->dev, &dev_attr_options); 506 device_remove_file(&dev->dev, &dev_attr_options);
506 err: 507err:
507 return rc; 508 return rc;
508} 509}
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index b4e2aa995b53..32386ce60478 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -335,7 +335,7 @@ static int __init isapnp_isolate(void)
335 } else if (iteration > 1) { 335 } else if (iteration > 1) {
336 break; 336 break;
337 } 337 }
338 __next: 338__next:
339 if (csn == 255) 339 if (csn == 255)
340 break; 340 break;
341 checksum = 0x6a; 341 checksum = 0x6a;
@@ -733,7 +733,7 @@ static int __init isapnp_create_device(struct pnp_card *card,
733 "isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n", 733 "isapnp: unexpected or unknown tag type 0x%x for logical device %i (device %i), ignored\n",
734 type, dev->number, card->number); 734 type, dev->number, card->number);
735 } 735 }
736 __skip: 736__skip:
737 if (size > 0) 737 if (size > 0)
738 isapnp_skip_bytes(size); 738 isapnp_skip_bytes(size);
739 } 739 }
@@ -788,7 +788,7 @@ static void __init isapnp_parse_resource_map(struct pnp_card *card)
788 "isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n", 788 "isapnp: unexpected or unknown tag type 0x%x for device %i, ignored\n",
789 type, card->number); 789 type, card->number);
790 } 790 }
791 __skip: 791__skip:
792 if (size > 0) 792 if (size > 0)
793 isapnp_skip_bytes(size); 793 isapnp_skip_bytes(size);
794 } 794 }
@@ -940,9 +940,6 @@ EXPORT_SYMBOL(isapnp_protocol);
940EXPORT_SYMBOL(isapnp_present); 940EXPORT_SYMBOL(isapnp_present);
941EXPORT_SYMBOL(isapnp_cfg_begin); 941EXPORT_SYMBOL(isapnp_cfg_begin);
942EXPORT_SYMBOL(isapnp_cfg_end); 942EXPORT_SYMBOL(isapnp_cfg_end);
943#if 0
944EXPORT_SYMBOL(isapnp_read_byte);
945#endif
946EXPORT_SYMBOL(isapnp_write_byte); 943EXPORT_SYMBOL(isapnp_write_byte);
947 944
948static int isapnp_read_resources(struct pnp_dev *dev, 945static int isapnp_read_resources(struct pnp_dev *dev,
@@ -993,6 +990,7 @@ static int isapnp_get_resources(struct pnp_dev *dev,
993 struct pnp_resource_table *res) 990 struct pnp_resource_table *res)
994{ 991{
995 int ret; 992 int ret;
993
996 pnp_init_resource_table(res); 994 pnp_init_resource_table(res);
997 isapnp_cfg_begin(dev->card->number, dev->number); 995 isapnp_cfg_begin(dev->card->number, dev->number);
998 ret = isapnp_read_resources(dev, res); 996 ret = isapnp_read_resources(dev, res);
@@ -1148,13 +1146,12 @@ static int __init isapnp_init(void)
1148 } 1146 }
1149 } 1147 }
1150 } 1148 }
1151 if (cards) { 1149 if (cards)
1152 printk(KERN_INFO 1150 printk(KERN_INFO
1153 "isapnp: %i Plug & Play card%s detected total\n", cards, 1151 "isapnp: %i Plug & Play card%s detected total\n", cards,
1154 cards > 1 ? "s" : ""); 1152 cards > 1 ? "s" : "");
1155 } else { 1153 else
1156 printk(KERN_INFO "isapnp: No Plug & Play card found\n"); 1154 printk(KERN_INFO "isapnp: No Plug & Play card found\n");
1157 }
1158 1155
1159 isapnp_proc_init(); 1156 isapnp_proc_init();
1160 return 0; 1157 return 0;
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index 3bda513a6bd3..329dc6c18384 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -390,7 +390,7 @@ static int pnp_assign_resources(struct pnp_dev *dev, int depnum)
390 up(&pnp_res_mutex); 390 up(&pnp_res_mutex);
391 return 1; 391 return 1;
392 392
393 fail: 393fail:
394 pnp_clean_resource_table(&dev->res); 394 pnp_clean_resource_table(&dev->res);
395 up(&pnp_res_mutex); 395 up(&pnp_res_mutex);
396 return 0; 396 return 0;
@@ -444,7 +444,7 @@ int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res,
444 kfree(bak); 444 kfree(bak);
445 return 0; 445 return 0;
446 446
447 fail: 447fail:
448 dev->res = *bak; 448 dev->res = *bak;
449 up(&pnp_res_mutex); 449 up(&pnp_res_mutex);
450 kfree(bak); 450 kfree(bak);
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 616fc72190bf..a5a372222d69 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -248,9 +248,9 @@ static int __init pnpacpi_add_device(struct acpi_device *device)
248 num++; 248 num++;
249 249
250 return AE_OK; 250 return AE_OK;
251 err1: 251err1:
252 kfree(dev_id); 252 kfree(dev_id);
253 err: 253err:
254 kfree(dev); 254 kfree(dev);
255 return -EINVAL; 255 return -EINVAL;
256} 256}
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index ce5027feb3da..51478c084220 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -35,6 +35,7 @@
35static int irq_flags(int triggering, int polarity) 35static int irq_flags(int triggering, int polarity)
36{ 36{
37 int flag; 37 int flag;
38
38 if (triggering == ACPI_LEVEL_SENSITIVE) { 39 if (triggering == ACPI_LEVEL_SENSITIVE) {
39 if (polarity == ACPI_ACTIVE_LOW) 40 if (polarity == ACPI_ACTIVE_LOW)
40 flag = IORESOURCE_IRQ_LOWLEVEL; 41 flag = IORESOURCE_IRQ_LOWLEVEL;
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 3692a099b45f..9892a6afe46c 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -591,6 +591,7 @@ subsys_initcall(pnpbios_init);
591static int __init pnpbios_thread_init(void) 591static int __init pnpbios_thread_init(void)
592{ 592{
593 struct task_struct *task; 593 struct task_struct *task;
594
594#if defined(CONFIG_PPC_MERGE) 595#if defined(CONFIG_PPC_MERGE)
595 if (check_legacy_ioport(PNPBIOS_BASE)) 596 if (check_legacy_ioport(PNPBIOS_BASE))
596 return 0; 597 return 0;
diff --git a/drivers/pnp/pnpbios/proc.c b/drivers/pnp/pnpbios/proc.c
index 9c8c07701b65..9d9841f24a85 100644
--- a/drivers/pnp/pnpbios/proc.c
+++ b/drivers/pnp/pnpbios/proc.c
@@ -212,7 +212,7 @@ static int proc_write_node(struct file *file, const char __user * buf,
212 goto out; 212 goto out;
213 } 213 }
214 ret = count; 214 ret = count;
215 out: 215out:
216 kfree(node); 216 kfree(node);
217 return ret; 217 return ret;
218} 218}
diff --git a/drivers/pnp/pnpbios/rsparser.c b/drivers/pnp/pnpbios/rsparser.c
index 04ecd7b67230..3fabf11b0027 100644
--- a/drivers/pnp/pnpbios/rsparser.c
+++ b/drivers/pnp/pnpbios/rsparser.c
@@ -238,7 +238,7 @@ static unsigned char *pnpbios_parse_allocated_resource_data(unsigned char *p,
238 break; 238 break;
239 239
240 default: /* an unkown tag */ 240 default: /* an unkown tag */
241 len_err: 241len_err:
242 printk(KERN_ERR 242 printk(KERN_ERR
243 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 243 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
244 tag, len); 244 tag, len);
@@ -298,6 +298,7 @@ static void pnpbios_parse_fixed_mem32_option(unsigned char *p, int size,
298 struct pnp_option *option) 298 struct pnp_option *option)
299{ 299{
300 struct pnp_mem *mem; 300 struct pnp_mem *mem;
301
301 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL); 302 mem = kzalloc(sizeof(struct pnp_mem), GFP_KERNEL);
302 if (!mem) 303 if (!mem)
303 return; 304 return;
@@ -468,7 +469,7 @@ static unsigned char *pnpbios_parse_resource_option_data(unsigned char *p,
468 return p + 2; 469 return p + 2;
469 470
470 default: /* an unkown tag */ 471 default: /* an unkown tag */
471 len_err: 472len_err:
472 printk(KERN_ERR 473 printk(KERN_ERR
473 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 474 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
474 tag, len); 475 tag, len);
@@ -562,7 +563,7 @@ static unsigned char *pnpbios_parse_compatible_ids(unsigned char *p,
562 break; 563 break;
563 564
564 default: /* an unkown tag */ 565 default: /* an unkown tag */
565 len_err: 566len_err:
566 printk(KERN_ERR 567 printk(KERN_ERR
567 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 568 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
568 tag, len); 569 tag, len);
@@ -756,7 +757,7 @@ static unsigned char *pnpbios_encode_allocated_resource_data(unsigned char *p,
756 break; 757 break;
757 758
758 default: /* an unkown tag */ 759 default: /* an unkown tag */
759 len_err: 760len_err:
760 printk(KERN_ERR 761 printk(KERN_ERR
761 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n", 762 "PnPBIOS: Unknown tag '0x%x', length '%d'.\n",
762 tag, len); 763 tag, len);