Pull style into test branch

Conflicts:

drivers/acpi/button.c
drivers/acpi/ec.c
drivers/acpi/osl.c
drivers/acpi/sbs.c

Len Brown cece9014 cfee47f9

+128 -134
+3 -3
drivers/acpi/ac.c
··· 109 109 110 110 static int acpi_ac_seq_show(struct seq_file *seq, void *offset) 111 111 { 112 - struct acpi_ac *ac = (struct acpi_ac *)seq->private; 112 + struct acpi_ac *ac = seq->private; 113 113 114 114 115 115 if (!ac) ··· 187 187 188 188 static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) 189 189 { 190 - struct acpi_ac *ac = (struct acpi_ac *)data; 190 + struct acpi_ac *ac = data; 191 191 struct acpi_device *device = NULL; 192 192 193 193 ··· 269 269 if (!device || !acpi_driver_data(device)) 270 270 return -EINVAL; 271 271 272 - ac = (struct acpi_ac *)acpi_driver_data(device); 272 + ac = acpi_driver_data(device); 273 273 274 274 status = acpi_remove_notify_handler(device->handle, 275 275 ACPI_ALL_NOTIFY, acpi_ac_notify);
+1 -1
drivers/acpi/acpi_memhotplug.c
··· 429 429 if (!device || !acpi_driver_data(device)) 430 430 return -EINVAL; 431 431 432 - mem_device = (struct acpi_memory_device *)acpi_driver_data(device); 432 + mem_device = acpi_driver_data(device); 433 433 kfree(mem_device); 434 434 435 435 return 0;
+3 -4
drivers/acpi/asus_acpi.c
··· 1146 1146 if (ACPI_FAILURE(status)) 1147 1147 printk(KERN_WARNING " Couldn't get the DSDT table header\n"); 1148 1148 else 1149 - asus_info = (struct acpi_table_header *)dsdt.pointer; 1149 + asus_info = dsdt.pointer; 1150 1150 1151 1151 /* We have to write 0 on init this far for all ASUS models */ 1152 1152 if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) { ··· 1168 1168 * asus_model_match() and try something completely different. 1169 1169 */ 1170 1170 if (buffer.pointer) { 1171 - model = (union acpi_object *)buffer.pointer; 1171 + model = buffer.pointer; 1172 1172 switch (model->type) { 1173 1173 case ACPI_TYPE_STRING: 1174 1174 string = model->string.pointer; ··· 1264 1264 printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", 1265 1265 ASUS_ACPI_VERSION); 1266 1266 1267 - hotk = 1268 - (struct asus_hotk *)kmalloc(sizeof(struct asus_hotk), GFP_KERNEL); 1267 + hotk = kmalloc(sizeof(struct asus_hotk), GFP_KERNEL); 1269 1268 if (!hotk) 1270 1269 return -ENOMEM; 1271 1270 memset(hotk, 0, sizeof(struct asus_hotk));
+11 -11
drivers/acpi/battery.c
··· 149 149 return -ENODEV; 150 150 } 151 151 152 - package = (union acpi_object *)buffer.pointer; 152 + package = buffer.pointer; 153 153 154 154 /* Extract Package Data */ 155 155 ··· 179 179 kfree(buffer.pointer); 180 180 181 181 if (!result) 182 - (*bif) = (struct acpi_battery_info *)data.pointer; 182 + (*bif) = data.pointer; 183 183 184 184 return result; 185 185 } ··· 209 209 return -ENODEV; 210 210 } 211 211 212 - package = (union acpi_object *)buffer.pointer; 212 + package = buffer.pointer; 213 213 214 214 /* Extract Package Data */ 215 215 ··· 239 239 kfree(buffer.pointer); 240 240 241 241 if (!result) 242 - (*bst) = (struct acpi_battery_status *)data.pointer; 242 + (*bst) = data.pointer; 243 243 244 244 return result; 245 245 } ··· 334 334 static int acpi_battery_read_info(struct seq_file *seq, void *offset) 335 335 { 336 336 int result = 0; 337 - struct acpi_battery *battery = (struct acpi_battery *)seq->private; 337 + struct acpi_battery *battery = seq->private; 338 338 struct acpi_battery_info *bif = NULL; 339 339 char *units = "?"; 340 340 ··· 418 418 static int acpi_battery_read_state(struct seq_file *seq, void *offset) 419 419 { 420 420 int result = 0; 421 - struct acpi_battery *battery = (struct acpi_battery *)seq->private; 421 + struct acpi_battery *battery = seq->private; 422 422 struct acpi_battery_status *bst = NULL; 423 423 char *units = "?"; 424 424 ··· 494 494 495 495 static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) 496 496 { 497 - struct acpi_battery *battery = (struct acpi_battery *)seq->private; 497 + struct acpi_battery *battery = seq->private; 498 498 char *units = "?"; 499 499 500 500 ··· 531 531 { 532 532 int result = 0; 533 533 char alarm_string[12] = { '\0' }; 534 - struct seq_file *m = (struct seq_file *)file->private_data; 535 - struct acpi_battery *battery = (struct acpi_battery *)m->private; 534 + struct seq_file *m = file->private_data; 535 + struct acpi_battery *battery = m->private; 536 536 537 537 538 538 if (!battery || (count > sizeof(alarm_string) - 1)) ··· 658 658 659 659 static void acpi_battery_notify(acpi_handle handle, u32 event, void *data) 660 660 { 661 - struct acpi_battery *battery = (struct acpi_battery *)data; 661 + struct acpi_battery *battery = data; 662 662 struct acpi_device *device = NULL; 663 663 664 664 ··· 742 742 if (!device || !acpi_driver_data(device)) 743 743 return -EINVAL; 744 744 745 - battery = (struct acpi_battery *)acpi_driver_data(device); 745 + battery = acpi_driver_data(device); 746 746 747 747 status = acpi_remove_notify_handler(device->handle, 748 748 ACPI_ALL_NOTIFY,
+1 -1
drivers/acpi/container.c
··· 117 117 acpi_status status = AE_OK; 118 118 struct acpi_container *pc = NULL; 119 119 120 - pc = (struct acpi_container *)acpi_driver_data(device); 120 + pc = acpi_driver_data(device); 121 121 kfree(pc); 122 122 return status; 123 123 }
+3 -3
drivers/acpi/dock.c
··· 565 565 */ 566 566 static void dock_notify(acpi_handle handle, u32 event, void *data) 567 567 { 568 - struct dock_station *ds = (struct dock_station *)data; 568 + struct dock_station *ds = data; 569 569 570 570 switch (event) { 571 571 case ACPI_NOTIFY_BUS_CHECK: ··· 616 616 { 617 617 acpi_status status; 618 618 acpi_handle tmp; 619 - struct dock_station *ds = (struct dock_station *)context; 619 + struct dock_station *ds = context; 620 620 struct dock_dependent_device *dd; 621 621 622 622 status = acpi_bus_get_ejd(handle, &tmp); ··· 792 792 static acpi_status 793 793 find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) 794 794 { 795 - int *count = (int *)context; 795 + int *count = context; 796 796 acpi_status status = AE_OK; 797 797 798 798 if (is_dock(handle)) {
+3 -3
drivers/acpi/fan.c
··· 99 99 size_t count, loff_t * ppos) 100 100 { 101 101 int result = 0; 102 - struct seq_file *m = (struct seq_file *)file->private_data; 103 - struct acpi_fan *fan = (struct acpi_fan *)m->private; 102 + struct seq_file *m = file->private_data; 103 + struct acpi_fan *fan = m->private; 104 104 char state_string[12] = { '\0' }; 105 105 106 106 ··· 229 229 if (!device || !acpi_driver_data(device)) 230 230 return -EINVAL; 231 231 232 - fan = (struct acpi_fan *)acpi_driver_data(device); 232 + fan = acpi_driver_data(device); 233 233 234 234 acpi_fan_remove_fs(device); 235 235
+2 -2
drivers/acpi/glue.c
··· 96 96 static acpi_status 97 97 do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) 98 98 { 99 - unsigned long *busnr = (unsigned long *)data; 99 + unsigned long *busnr = data; 100 100 struct acpi_resource_address64 address; 101 101 102 102 if (resource->type != ACPI_RESOURCE_TYPE_ADDRESS16 && ··· 221 221 acpi_status status; 222 222 struct acpi_device_info *info; 223 223 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 224 - struct acpi_find_child *find = (struct acpi_find_child *)context; 224 + struct acpi_find_child *find = context; 225 225 226 226 status = acpi_get_object_info(handle, &buffer); 227 227 if (ACPI_SUCCESS(status)) {
+2 -3
drivers/acpi/hotkey.c
··· 265 265 266 266 static int hotkey_polling_seq_show(struct seq_file *seq, void *offset) 267 267 { 268 - struct acpi_polling_hotkey *poll_hotkey = 269 - (struct acpi_polling_hotkey *)seq->private; 268 + struct acpi_polling_hotkey *poll_hotkey = seq->private; 270 269 char *buf; 271 270 272 271 ··· 576 577 if (ACPI_FAILURE(status)) 577 578 goto do_fail_zero; 578 579 key->poll_hotkey.poll_result = 579 - (union acpi_object *)kmalloc(sizeof(union acpi_object), GFP_KERNEL); 580 + kmalloc(sizeof(union acpi_object), GFP_KERNEL); 580 581 if (!key->poll_hotkey.poll_result) 581 582 goto do_fail_zero; 582 583 return AE_OK;
+1 -1
drivers/acpi/i2c_ec.c
··· 393 393 394 394 struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device) 395 395 { 396 - return ((struct acpi_ec_hc *)acpi_driver_data(device->parent)); 396 + return acpi_driver_data(device->parent); 397 397 } 398 398 399 399 EXPORT_SYMBOL(acpi_get_ec_hc);
+3 -3
drivers/acpi/ibm_acpi.c
··· 2417 2417 static int dispatch_read(char *page, char **start, off_t off, int count, 2418 2418 int *eof, void *data) 2419 2419 { 2420 - struct ibm_struct *ibm = (struct ibm_struct *)data; 2420 + struct ibm_struct *ibm = data; 2421 2421 int len; 2422 2422 2423 2423 if (!ibm || !ibm->read) ··· 2442 2442 static int dispatch_write(struct file *file, const char __user * userbuf, 2443 2443 unsigned long count, void *data) 2444 2444 { 2445 - struct ibm_struct *ibm = (struct ibm_struct *)data; 2445 + struct ibm_struct *ibm = data; 2446 2446 char *kernbuf; 2447 2447 int ret; 2448 2448 ··· 2471 2471 2472 2472 static void dispatch_notify(acpi_handle handle, u32 event, void *data) 2473 2473 { 2474 - struct ibm_struct *ibm = (struct ibm_struct *)data; 2474 + struct ibm_struct *ibm = data; 2475 2475 2476 2476 if (!ibm || !ibm->notify) 2477 2477 return;
+1 -1
drivers/acpi/numa.c
··· 248 248 handle = phandle; 249 249 status = acpi_evaluate_integer(handle, "_PXM", NULL, &pxm); 250 250 if (ACPI_SUCCESS(status)) 251 - return (int)pxm; 251 + return pxm; 252 252 status = acpi_get_parent(handle, &phandle); 253 253 } while (ACPI_SUCCESS(status)); 254 254 return -1;
+2 -1
drivers/acpi/osl.c
··· 568 568 static void acpi_os_execute_deferred(struct work_struct *work) 569 569 { 570 570 struct acpi_os_dpc *dpc = container_of(work, struct acpi_os_dpc, work); 571 + 571 572 if (!dpc) { 572 573 printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); 573 574 return; ··· 1052 1051 1053 1052 acpi_status acpi_os_purge_cache(acpi_cache_t * cache) 1054 1053 { 1055 - (void)kmem_cache_shrink(cache); 1054 + kmem_cache_shrink(cache); 1056 1055 return (AE_OK); 1057 1056 } 1058 1057
+2 -2
drivers/acpi/pci_bind.c
··· 281 281 if (!device || !device->parent) 282 282 return -EINVAL; 283 283 284 - pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 284 + pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 285 285 if (!pathname) 286 286 return -ENOMEM; 287 287 memset(pathname, 0, ACPI_PATHNAME_MAX); ··· 332 332 struct acpi_buffer buffer = { 0, NULL }; 333 333 334 334 335 - pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 335 + pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 336 336 if (!pathname) 337 337 return -ENOMEM; 338 338 memset(pathname, 0, ACPI_PATHNAME_MAX);
+1 -1
drivers/acpi/pci_irq.c
··· 161 161 static int first_time = 1; 162 162 163 163 164 - pathname = (char *)kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 164 + pathname = kmalloc(ACPI_PATHNAME_MAX, GFP_KERNEL); 165 165 if (!pathname) 166 166 return -ENOMEM; 167 167 memset(pathname, 0, ACPI_PATHNAME_MAX);
+4 -4
drivers/acpi/pci_link.c
··· 103 103 static acpi_status 104 104 acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) 105 105 { 106 - struct acpi_pci_link *link = (struct acpi_pci_link *)context; 106 + struct acpi_pci_link *link = context; 107 107 u32 i = 0; 108 108 109 109 ··· 613 613 return -1; 614 614 } 615 615 616 - link = (struct acpi_pci_link *)acpi_driver_data(device); 616 + link = acpi_driver_data(device); 617 617 if (!link) { 618 618 printk(KERN_ERR PREFIX "Invalid link context\n"); 619 619 return -1; ··· 668 668 return -1; 669 669 } 670 670 671 - link = (struct acpi_pci_link *)acpi_driver_data(device); 671 + link = acpi_driver_data(device); 672 672 if (!link) { 673 673 printk(KERN_ERR PREFIX "Invalid link context\n"); 674 674 return -1; ··· 808 808 if (!device || !acpi_driver_data(device)) 809 809 return -EINVAL; 810 810 811 - link = (struct acpi_pci_link *)acpi_driver_data(device); 811 + link = acpi_driver_data(device); 812 812 813 813 mutex_lock(&acpi_link_lock); 814 814 list_del(&link->node);
+2 -2
drivers/acpi/pci_root.c
··· 119 119 static acpi_status 120 120 get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) 121 121 { 122 - int *busnr = (int *)data; 122 + int *busnr = data; 123 123 struct acpi_resource_address64 address; 124 124 125 125 if (resource->type != ACPI_RESOURCE_TYPE_ADDRESS16 && ··· 331 331 if (!device || !acpi_driver_data(device)) 332 332 return -EINVAL; 333 333 334 - root = (struct acpi_pci_root *)acpi_driver_data(device); 334 + root = acpi_driver_data(device); 335 335 336 336 kfree(root); 337 337
+3 -3
drivers/acpi/power.c
··· 108 108 return result; 109 109 } 110 110 111 - *resource = (struct acpi_power_resource *)acpi_driver_data(device); 111 + *resource = acpi_driver_data(device); 112 112 if (!resource) 113 113 return -ENODEV; 114 114 ··· 442 442 struct acpi_power_resource *resource = NULL; 443 443 444 444 445 - resource = (struct acpi_power_resource *)seq->private; 445 + resource = seq->private; 446 446 447 447 if (!resource) 448 448 goto end; ··· 590 590 if (!device || !acpi_driver_data(device)) 591 591 return -EINVAL; 592 592 593 - resource = (struct acpi_power_resource *)acpi_driver_data(device); 593 + resource = acpi_driver_data(device); 594 594 595 595 acpi_power_remove_fs(device); 596 596
+5 -5
drivers/acpi/processor_core.c
··· 277 277 278 278 static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset) 279 279 { 280 - struct acpi_processor *pr = (struct acpi_processor *)seq->private; 280 + struct acpi_processor *pr = seq->private; 281 281 282 282 283 283 if (!pr) ··· 542 542 * Don't trust it blindly 543 543 */ 544 544 if (processor_device_array[pr->id] != NULL && 545 - processor_device_array[pr->id] != (void *)device) { 545 + processor_device_array[pr->id] != device) { 546 546 printk(KERN_WARNING "BIOS reported wrong ACPI id" 547 547 "for the processor\n"); 548 548 return -ENODEV; 549 549 } 550 - processor_device_array[pr->id] = (void *)device; 550 + processor_device_array[pr->id] = device; 551 551 552 552 processors[pr->id] = pr; 553 553 ··· 578 578 579 579 static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) 580 580 { 581 - struct acpi_processor *pr = (struct acpi_processor *)data; 581 + struct acpi_processor *pr = data; 582 582 struct acpi_device *device = NULL; 583 583 584 584 ··· 637 637 if (!device || !acpi_driver_data(device)) 638 638 return -EINVAL; 639 639 640 - pr = (struct acpi_processor *)acpi_driver_data(device); 640 + pr = acpi_driver_data(device); 641 641 642 642 if (pr->id >= NR_CPUS) { 643 643 kfree(pr);
+7 -7
drivers/acpi/processor_idle.c
··· 673 673 return -ENODEV; 674 674 } 675 675 676 - cst = (union acpi_object *)buffer.pointer; 676 + cst = buffer.pointer; 677 677 678 678 /* There must be at least 2 elements */ 679 679 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) { ··· 702 702 703 703 memset(&cx, 0, sizeof(cx)); 704 704 705 - element = (union acpi_object *)&(cst->package.elements[i]); 705 + element = &(cst->package.elements[i]); 706 706 if (element->type != ACPI_TYPE_PACKAGE) 707 707 continue; 708 708 709 709 if (element->package.count != 4) 710 710 continue; 711 711 712 - obj = (union acpi_object *)&(element->package.elements[0]); 712 + obj = &(element->package.elements[0]); 713 713 714 714 if (obj->type != ACPI_TYPE_BUFFER) 715 715 continue; ··· 721 721 continue; 722 722 723 723 /* There should be an easy way to extract an integer... */ 724 - obj = (union acpi_object *)&(element->package.elements[1]); 724 + obj = &(element->package.elements[1]); 725 725 if (obj->type != ACPI_TYPE_INTEGER) 726 726 continue; 727 727 ··· 754 754 } 755 755 } 756 756 757 - obj = (union acpi_object *)&(element->package.elements[2]); 757 + obj = &(element->package.elements[2]); 758 758 if (obj->type != ACPI_TYPE_INTEGER) 759 759 continue; 760 760 761 761 cx.latency = obj->integer.value; 762 762 763 - obj = (union acpi_object *)&(element->package.elements[3]); 763 + obj = &(element->package.elements[3]); 764 764 if (obj->type != ACPI_TYPE_INTEGER) 765 765 continue; 766 766 ··· 1029 1029 1030 1030 static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) 1031 1031 { 1032 - struct acpi_processor *pr = (struct acpi_processor *)seq->private; 1032 + struct acpi_processor *pr = seq->private; 1033 1033 unsigned int i; 1034 1034 1035 1035
+5 -5
drivers/acpi/processor_perflib.c
··· 236 236 return -ENODEV; 237 237 } 238 238 239 - pss = (union acpi_object *)buffer.pointer; 239 + pss = buffer.pointer; 240 240 if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) { 241 241 printk(KERN_ERR PREFIX "Invalid _PSS data\n"); 242 242 result = -EFAULT; ··· 410 410 411 411 static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset) 412 412 { 413 - struct acpi_processor *pr = (struct acpi_processor *)seq->private; 413 + struct acpi_processor *pr = seq->private; 414 414 int i; 415 415 416 416 ··· 451 451 size_t count, loff_t * data) 452 452 { 453 453 int result = 0; 454 - struct seq_file *m = (struct seq_file *)file->private_data; 455 - struct acpi_processor *pr = (struct acpi_processor *)m->private; 454 + struct seq_file *m = file->private_data; 455 + struct acpi_processor *pr = m->private; 456 456 struct acpi_processor_performance *perf; 457 457 char state_string[12] = { '\0' }; 458 458 unsigned int new_state = 0; ··· 551 551 return -ENODEV; 552 552 } 553 553 554 - psd = (union acpi_object *) buffer.pointer; 554 + psd = buffer.pointer; 555 555 if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) { 556 556 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n")); 557 557 result = -EFAULT;
+3 -3
drivers/acpi/processor_thermal.c
··· 208 208 if (result) 209 209 return result; 210 210 211 - pr = (struct acpi_processor *)acpi_driver_data(device); 211 + pr = acpi_driver_data(device); 212 212 if (!pr) 213 213 return -ENODEV; 214 214 ··· 348 348 size_t count, loff_t * data) 349 349 { 350 350 int result = 0; 351 - struct seq_file *m = (struct seq_file *)file->private_data; 352 - struct acpi_processor *pr = (struct acpi_processor *)m->private; 351 + struct seq_file *m = file->private_data; 352 + struct acpi_processor *pr = m->private; 353 353 char limit_string[25] = { '\0' }; 354 354 int px = 0; 355 355 int tx = 0;
+3 -3
drivers/acpi/processor_throttling.c
··· 259 259 static int acpi_processor_throttling_seq_show(struct seq_file *seq, 260 260 void *offset) 261 261 { 262 - struct acpi_processor *pr = (struct acpi_processor *)seq->private; 262 + struct acpi_processor *pr = seq->private; 263 263 int i = 0; 264 264 int result = 0; 265 265 ··· 307 307 size_t count, loff_t * data) 308 308 { 309 309 int result = 0; 310 - struct seq_file *m = (struct seq_file *)file->private_data; 311 - struct acpi_processor *pr = (struct acpi_processor *)m->private; 310 + struct seq_file *m = file->private_data; 311 + struct acpi_processor *pr = m->private; 312 312 char state_string[12] = { '\0' }; 313 313 314 314
+12 -12
drivers/acpi/sbs.c
··· 923 923 924 924 static int acpi_battery_read_info(struct seq_file *seq, void *offset) 925 925 { 926 - struct acpi_battery *battery = (struct acpi_battery *)seq->private; 926 + struct acpi_battery *battery = seq->private; 927 927 int cscale; 928 928 int result = 0; 929 929 ··· 1076 1076 1077 1077 static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) 1078 1078 { 1079 - struct acpi_battery *battery = (struct acpi_battery *)seq->private; 1079 + struct acpi_battery *battery = seq->private; 1080 1080 int result = 0; 1081 1081 int cscale; 1082 1082 ··· 1125 1125 acpi_battery_write_alarm(struct file *file, const char __user * buffer, 1126 1126 size_t count, loff_t * ppos) 1127 1127 { 1128 - struct seq_file *seq = (struct seq_file *)file->private_data; 1129 - struct acpi_battery *battery = (struct acpi_battery *)seq->private; 1128 + struct seq_file *seq = file->private_data; 1129 + struct acpi_battery *battery = seq->private; 1130 1130 char alarm_string[12] = { '\0' }; 1131 1131 int result, old_alarm, new_alarm; 1132 1132 ··· 1160 1160 if (result) { 1161 1161 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1162 1162 "acpi_battery_set_alarm() failed\n")); 1163 - (void)acpi_battery_set_alarm(battery, old_alarm); 1163 + acpi_battery_set_alarm(battery, old_alarm); 1164 1164 goto end; 1165 1165 } 1166 1166 result = acpi_battery_get_alarm(battery); 1167 1167 if (result) { 1168 1168 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1169 1169 "acpi_battery_get_alarm() failed\n")); 1170 - (void)acpi_battery_set_alarm(battery, old_alarm); 1170 + acpi_battery_set_alarm(battery, old_alarm); 1171 1171 goto end; 1172 1172 } 1173 1173 ··· 1217 1217 1218 1218 static int acpi_ac_read_state(struct seq_file *seq, void *offset) 1219 1219 { 1220 - struct acpi_sbs *sbs = (struct acpi_sbs *)seq->private; 1220 + struct acpi_sbs *sbs = seq->private; 1221 1221 int result; 1222 1222 1223 1223 if (sbs->zombie) { ··· 1302 1302 battery->init_state = 1; 1303 1303 } 1304 1304 1305 - (void)sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); 1305 + sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); 1306 1306 1307 1307 result = acpi_sbs_generic_add_fs(&battery->battery_entry, 1308 1308 acpi_battery_dir, ··· 1485 1485 } 1486 1486 1487 1487 if (old_battery_present != new_battery_present) { 1488 - (void)sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); 1488 + sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); 1489 1489 result = acpi_sbs_generate_event(sbs->device, 1490 1490 ACPI_SBS_BATTERY_NOTIFY_STATUS, 1491 1491 new_battery_present, ··· 1498 1498 } 1499 1499 } 1500 1500 if (old_remaining_capacity != battery->state.remaining_capacity) { 1501 - (void)sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); 1501 + sprintf(dir_name, ACPI_BATTERY_DIR_NAME, id); 1502 1502 result = acpi_sbs_generate_event(sbs->device, 1503 1503 ACPI_SBS_BATTERY_NOTIFY_STATUS, 1504 1504 new_battery_present, ··· 1659 1659 init_timer(&sbs->update_timer); 1660 1660 if (update_mode == QUEUE_UPDATE_MODE) { 1661 1661 status = acpi_os_execute(OSL_GPE_HANDLER, 1662 - acpi_sbs_update_queue, (void *)sbs); 1662 + acpi_sbs_update_queue, sbs); 1663 1663 if (status != AE_OK) { 1664 1664 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, 1665 1665 "acpi_os_execute() failed\n")); ··· 1685 1685 1686 1686 int acpi_sbs_remove(struct acpi_device *device, int type) 1687 1687 { 1688 - struct acpi_sbs *sbs = NULL; 1688 + struct acpi_sbs *sbs; 1689 1689 int id; 1690 1690 1691 1691 if (!device) {
+1 -1
drivers/acpi/tables.c
··· 228 228 static int 229 229 acpi_table_compute_checksum(void *table_pointer, unsigned long length) 230 230 { 231 - u8 *p = (u8 *) table_pointer; 231 + u8 *p = table_pointer; 232 232 unsigned long remains = length; 233 233 unsigned long sum = 0; 234 234
+15 -15
drivers/acpi/thermal.c
··· 663 663 static void acpi_thermal_check(void *data) 664 664 { 665 665 int result = 0; 666 - struct acpi_thermal *tz = (struct acpi_thermal *)data; 666 + struct acpi_thermal *tz = data; 667 667 unsigned long sleep_time = 0; 668 668 int i = 0; 669 669 struct acpi_thermal_state state; ··· 778 778 779 779 static int acpi_thermal_state_seq_show(struct seq_file *seq, void *offset) 780 780 { 781 - struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 781 + struct acpi_thermal *tz = seq->private; 782 782 783 783 784 784 if (!tz) ··· 813 813 static int acpi_thermal_temp_seq_show(struct seq_file *seq, void *offset) 814 814 { 815 815 int result = 0; 816 - struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 816 + struct acpi_thermal *tz = seq->private; 817 817 818 818 819 819 if (!tz) ··· 837 837 838 838 static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) 839 839 { 840 - struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 840 + struct acpi_thermal *tz = seq->private; 841 841 int i = 0; 842 842 int j = 0; 843 843 ··· 893 893 const char __user * buffer, 894 894 size_t count, loff_t * ppos) 895 895 { 896 - struct seq_file *m = (struct seq_file *)file->private_data; 897 - struct acpi_thermal *tz = (struct acpi_thermal *)m->private; 896 + struct seq_file *m = file->private_data; 897 + struct acpi_thermal *tz = m->private; 898 898 899 899 char *limit_string; 900 900 int num, critical, hot, passive; ··· 953 953 954 954 static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset) 955 955 { 956 - struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 956 + struct acpi_thermal *tz = seq->private; 957 957 958 958 959 959 if (!tz) ··· 984 984 const char __user * buffer, 985 985 size_t count, loff_t * ppos) 986 986 { 987 - struct seq_file *m = (struct seq_file *)file->private_data; 988 - struct acpi_thermal *tz = (struct acpi_thermal *)m->private; 987 + struct seq_file *m = file->private_data; 988 + struct acpi_thermal *tz = m->private; 989 989 int result = 0; 990 990 char mode_string[12] = { '\0' }; 991 991 ··· 1014 1014 1015 1015 static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset) 1016 1016 { 1017 - struct acpi_thermal *tz = (struct acpi_thermal *)seq->private; 1017 + struct acpi_thermal *tz = seq->private; 1018 1018 1019 1019 1020 1020 if (!tz) ··· 1043 1043 const char __user * buffer, 1044 1044 size_t count, loff_t * ppos) 1045 1045 { 1046 - struct seq_file *m = (struct seq_file *)file->private_data; 1047 - struct acpi_thermal *tz = (struct acpi_thermal *)m->private; 1046 + struct seq_file *m = file->private_data; 1047 + struct acpi_thermal *tz = m->private; 1048 1048 int result = 0; 1049 1049 char polling_string[12] = { '\0' }; 1050 1050 int seconds = 0; ··· 1170 1170 1171 1171 static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data) 1172 1172 { 1173 - struct acpi_thermal *tz = (struct acpi_thermal *)data; 1173 + struct acpi_thermal *tz = data; 1174 1174 struct acpi_device *device = NULL; 1175 1175 1176 1176 ··· 1324 1324 if (!device || !acpi_driver_data(device)) 1325 1325 return -EINVAL; 1326 1326 1327 - tz = (struct acpi_thermal *)acpi_driver_data(device); 1327 + tz = acpi_driver_data(device); 1328 1328 1329 1329 /* avoid timer adding new defer task */ 1330 1330 tz->zombie = 1; ··· 1364 1364 if (!device || !acpi_driver_data(device)) 1365 1365 return -EINVAL; 1366 1366 1367 - tz = (struct acpi_thermal *)acpi_driver_data(device); 1367 + tz = acpi_driver_data(device); 1368 1368 1369 1369 acpi_thermal_get_temperature(tz); 1370 1370
+2 -2
drivers/acpi/utils.c
··· 83 83 return AE_BAD_DATA; 84 84 } 85 85 86 - format_string = (char *)format->pointer; 86 + format_string = format->pointer; 87 87 88 88 /* 89 89 * Calculate size_required. ··· 361 361 if (ACPI_FAILURE(status)) 362 362 goto end; 363 363 364 - package = (union acpi_object *)buffer.pointer; 364 + package = buffer.pointer; 365 365 366 366 if ((buffer.length == 0) || !package) { 367 367 printk(KERN_ERR PREFIX "No return object (len %X ptr %p)\n",
+27 -32
drivers/acpi/video.c
··· 386 386 if (ACPI_FAILURE(status)) 387 387 return -ENODEV; 388 388 389 - obj = (union acpi_object *)buffer.pointer; 389 + obj = buffer.pointer; 390 390 391 391 if (obj && obj->type == ACPI_TYPE_BUFFER) 392 392 *edid = obj; ··· 654 654 655 655 static int acpi_video_device_info_seq_show(struct seq_file *seq, void *offset) 656 656 { 657 - struct acpi_video_device *dev = 658 - (struct acpi_video_device *)seq->private; 657 + struct acpi_video_device *dev = seq->private; 659 658 660 659 661 660 if (!dev) ··· 687 688 static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset) 688 689 { 689 690 int status; 690 - struct acpi_video_device *dev = 691 - (struct acpi_video_device *)seq->private; 691 + struct acpi_video_device *dev = seq->private; 692 692 unsigned long state; 693 693 694 694 ··· 725 727 size_t count, loff_t * data) 726 728 { 727 729 int status; 728 - struct seq_file *m = (struct seq_file *)file->private_data; 729 - struct acpi_video_device *dev = (struct acpi_video_device *)m->private; 730 + struct seq_file *m = file->private_data; 731 + struct acpi_video_device *dev = m->private; 730 732 char str[12] = { 0 }; 731 733 u32 state = 0; 732 734 ··· 752 754 static int 753 755 acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset) 754 756 { 755 - struct acpi_video_device *dev = 756 - (struct acpi_video_device *)seq->private; 757 + struct acpi_video_device *dev = seq->private; 757 758 int i; 758 759 759 760 ··· 781 784 const char __user * buffer, 782 785 size_t count, loff_t * data) 783 786 { 784 - struct seq_file *m = (struct seq_file *)file->private_data; 785 - struct acpi_video_device *dev = (struct acpi_video_device *)m->private; 787 + struct seq_file *m = file->private_data; 788 + struct acpi_video_device *dev = m->private; 786 789 char str[4] = { 0 }; 787 790 unsigned int level = 0; 788 791 int i; ··· 814 817 815 818 static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset) 816 819 { 817 - struct acpi_video_device *dev = 818 - (struct acpi_video_device *)seq->private; 820 + struct acpi_video_device *dev = seq->private; 819 821 int status; 820 822 int i; 821 823 union acpi_object *edid = NULL; ··· 862 866 if (!device) 863 867 return -ENODEV; 864 868 865 - vid_dev = (struct acpi_video_device *)acpi_driver_data(device); 869 + vid_dev = acpi_driver_data(device); 866 870 if (!vid_dev) 867 871 return -ENODEV; 868 872 ··· 927 931 { 928 932 struct acpi_video_device *vid_dev; 929 933 930 - vid_dev = (struct acpi_video_device *)acpi_driver_data(device); 934 + vid_dev = acpi_driver_data(device); 931 935 if (!vid_dev || !vid_dev->video || !vid_dev->video->dir) 932 936 return -ENODEV; 933 937 ··· 946 950 /* video bus */ 947 951 static int acpi_video_bus_info_seq_show(struct seq_file *seq, void *offset) 948 952 { 949 - struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 953 + struct acpi_video_bus *video = seq->private; 950 954 951 955 952 956 if (!video) ··· 971 975 972 976 static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset) 973 977 { 974 - struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 978 + struct acpi_video_bus *video = seq->private; 975 979 976 980 977 981 if (!video) ··· 991 995 992 996 static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset) 993 997 { 994 - struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 998 + struct acpi_video_bus *video = seq->private; 995 999 unsigned long options; 996 1000 int status; 997 1001 ··· 1029 1033 1030 1034 static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset) 1031 1035 { 1032 - struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 1036 + struct acpi_video_bus *video = seq->private; 1033 1037 int status; 1034 1038 unsigned long id; 1035 1039 ··· 1050 1054 1051 1055 static int acpi_video_bus_DOS_seq_show(struct seq_file *seq, void *offset) 1052 1056 { 1053 - struct acpi_video_bus *video = (struct acpi_video_bus *)seq->private; 1057 + struct acpi_video_bus *video = seq->private; 1054 1058 1055 1059 1056 1060 seq_printf(seq, "DOS setting: <%d>\n", video->dos_setting); ··· 1075 1079 size_t count, loff_t * data) 1076 1080 { 1077 1081 int status; 1078 - struct seq_file *m = (struct seq_file *)file->private_data; 1079 - struct acpi_video_bus *video = (struct acpi_video_bus *)m->private; 1082 + struct seq_file *m = file->private_data; 1083 + struct acpi_video_bus *video = m->private; 1080 1084 char str[12] = { 0 }; 1081 1085 unsigned long opt, options; 1082 1086 ··· 1115 1119 size_t count, loff_t * data) 1116 1120 { 1117 1121 int status; 1118 - struct seq_file *m = (struct seq_file *)file->private_data; 1119 - struct acpi_video_bus *video = (struct acpi_video_bus *)m->private; 1122 + struct seq_file *m = file->private_data; 1123 + struct acpi_video_bus *video = m->private; 1120 1124 char str[12] = { 0 }; 1121 1125 unsigned long opt; 1122 1126 ··· 1146 1150 struct acpi_video_bus *video; 1147 1151 1148 1152 1149 - video = (struct acpi_video_bus *)acpi_driver_data(device); 1153 + video = acpi_driver_data(device); 1150 1154 1151 1155 if (!acpi_device_dir(device)) { 1152 1156 acpi_device_dir(device) = proc_mkdir(acpi_device_bid(device), ··· 1222 1226 struct acpi_video_bus *video; 1223 1227 1224 1228 1225 - video = (struct acpi_video_bus *)acpi_driver_data(device); 1229 + video = acpi_driver_data(device); 1226 1230 1227 1231 if (acpi_device_dir(device)) { 1228 1232 remove_proc_entry("info", acpi_device_dir(device)); ··· 1399 1403 return status; 1400 1404 } 1401 1405 1402 - dod = (union acpi_object *)buffer.pointer; 1406 + dod = buffer.pointer; 1403 1407 if (!dod || (dod->type != ACPI_TYPE_PACKAGE)) { 1404 1408 ACPI_EXCEPTION((AE_INFO, status, "Invalid _DOD data")); 1405 1409 status = -EFAULT; ··· 1422 1426 1423 1427 count = 0; 1424 1428 for (i = 0; i < dod->package.count; i++) { 1425 - obj = (union acpi_object *)&dod->package.elements[i]; 1429 + obj = &dod->package.elements[i]; 1426 1430 1427 1431 if (obj->type != ACPI_TYPE_INTEGER) { 1428 1432 printk(KERN_ERR PREFIX "Invalid _DOD data\n"); ··· 1608 1612 1609 1613 static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) 1610 1614 { 1611 - struct acpi_video_bus *video = (struct acpi_video_bus *)data; 1615 + struct acpi_video_bus *video = data; 1612 1616 struct acpi_device *device = NULL; 1613 1617 1614 1618 printk("video bus notify\n"); ··· 1650 1654 1651 1655 static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) 1652 1656 { 1653 - struct acpi_video_device *video_device = 1654 - (struct acpi_video_device *)data; 1657 + struct acpi_video_device *video_device = data; 1655 1658 struct acpi_device *device = NULL; 1656 1659 1657 1660 ··· 1752 1757 if (!device || !acpi_driver_data(device)) 1753 1758 return -EINVAL; 1754 1759 1755 - video = (struct acpi_video_bus *)acpi_driver_data(device); 1760 + video = acpi_driver_data(device); 1756 1761 1757 1762 acpi_video_bus_stop_devices(video); 1758 1763