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