aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJan Engelhardt <jengelh@linux01.gwdg.de>2006-09-30 18:28:50 -0400
committerLen Brown <len.brown@intel.com>2006-10-14 01:51:07 -0400
commit50dd096973f1d95aa03c6a6d9e148d706b62b68e (patch)
tree1f047b9c574672c133559922af5d4aee2816b9ae /drivers
parentb4bd8c66435a8cdf8c90334fb3b517a23ff2ab95 (diff)
ACPI: Remove unnecessary from/to-void* and to-void casts in drivers/acpi
Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/ac.c6
-rw-r--r--drivers/acpi/acpi_memhotplug.c2
-rw-r--r--drivers/acpi/asus_acpi.c7
-rw-r--r--drivers/acpi/battery.c22
-rw-r--r--drivers/acpi/button.c8
-rw-r--r--drivers/acpi/container.c2
-rw-r--r--drivers/acpi/dock.c6
-rw-r--r--drivers/acpi/ec.c12
-rw-r--r--drivers/acpi/fan.c6
-rw-r--r--drivers/acpi/glue.c4
-rw-r--r--drivers/acpi/hotkey.c5
-rw-r--r--drivers/acpi/i2c_ec.c2
-rw-r--r--drivers/acpi/ibm_acpi.c6
-rw-r--r--drivers/acpi/numa.c2
-rw-r--r--drivers/acpi/osl.c4
-rw-r--r--drivers/acpi/pci_bind.c4
-rw-r--r--drivers/acpi/pci_irq.c2
-rw-r--r--drivers/acpi/pci_link.c8
-rw-r--r--drivers/acpi/pci_root.c4
-rw-r--r--drivers/acpi/power.c6
-rw-r--r--drivers/acpi/processor_core.c10
-rw-r--r--drivers/acpi/processor_idle.c14
-rw-r--r--drivers/acpi/processor_perflib.c10
-rw-r--r--drivers/acpi/processor_thermal.c6
-rw-r--r--drivers/acpi/processor_throttling.c6
-rw-r--r--drivers/acpi/sbs.c24
-rw-r--r--drivers/acpi/tables.c2
-rw-r--r--drivers/acpi/thermal.c30
-rw-r--r--drivers/acpi/utils.c4
-rw-r--r--drivers/acpi/video.c59
30 files changed, 138 insertions, 145 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
110static int acpi_ac_seq_show(struct seq_file *seq, void *offset) 110static 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
188static void acpi_ac_notify(acpi_handle handle, u32 event, void *data) 188static 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 98099de59b45..13687835c460 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -427,7 +427,7 @@ static int acpi_memory_device_remove(struct acpi_device *device, int type)
427 if (!device || !acpi_driver_data(device)) 427 if (!device || !acpi_driver_data(device))
428 return -EINVAL; 428 return -EINVAL;
429 429
430 mem_device = (struct acpi_memory_device *)acpi_driver_data(device); 430 mem_device = acpi_driver_data(device);
431 kfree(mem_device); 431 kfree(mem_device);
432 432
433 return 0; 433 return 0;
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c
index e9ee4c52a5f6..f7db8ea7ac0a 100644
--- a/drivers/acpi/asus_acpi.c
+++ b/drivers/acpi/asus_acpi.c
@@ -1128,7 +1128,7 @@ static int asus_hotk_get_info(void)
1128 if (ACPI_FAILURE(status)) 1128 if (ACPI_FAILURE(status))
1129 printk(KERN_WARNING " Couldn't get the DSDT table header\n"); 1129 printk(KERN_WARNING " Couldn't get the DSDT table header\n");
1130 else 1130 else
1131 asus_info = (struct acpi_table_header *)dsdt.pointer; 1131 asus_info = dsdt.pointer;
1132 1132
1133 /* We have to write 0 on init this far for all ASUS models */ 1133 /* We have to write 0 on init this far for all ASUS models */
1134 if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) { 1134 if (!write_acpi_int(hotk->handle, "INIT", 0, &buffer)) {
@@ -1150,7 +1150,7 @@ static int asus_hotk_get_info(void)
1150 * asus_model_match() and try something completely different. 1150 * asus_model_match() and try something completely different.
1151 */ 1151 */
1152 if (buffer.pointer) { 1152 if (buffer.pointer) {
1153 model = (union acpi_object *)buffer.pointer; 1153 model = buffer.pointer;
1154 switch (model->type) { 1154 switch (model->type) {
1155 case ACPI_TYPE_STRING: 1155 case ACPI_TYPE_STRING:
1156 string = model->string.pointer; 1156 string = model->string.pointer;
@@ -1245,8 +1245,7 @@ static int asus_hotk_add(struct acpi_device *device)
1245 printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n", 1245 printk(KERN_NOTICE "Asus Laptop ACPI Extras version %s\n",
1246 ASUS_ACPI_VERSION); 1246 ASUS_ACPI_VERSION);
1247 1247
1248 hotk = 1248 hotk = kmalloc(sizeof(struct asus_hotk), GFP_KERNEL);
1249 (struct asus_hotk *)kmalloc(sizeof(struct asus_hotk), GFP_KERNEL);
1250 if (!hotk) 1249 if (!hotk)
1251 return -ENOMEM; 1250 return -ENOMEM;
1252 memset(hotk, 0, sizeof(struct asus_hotk)); 1251 memset(hotk, 0, sizeof(struct asus_hotk));
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 9810e2a55d0a..adb0d2725731 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -147,7 +147,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
147 return -ENODEV; 147 return -ENODEV;
148 } 148 }
149 149
150 package = (union acpi_object *)buffer.pointer; 150 package = buffer.pointer;
151 151
152 /* Extract Package Data */ 152 /* Extract Package Data */
153 153
@@ -177,7 +177,7 @@ acpi_battery_get_info(struct acpi_battery *battery,
177 kfree(buffer.pointer); 177 kfree(buffer.pointer);
178 178
179 if (!result) 179 if (!result)
180 (*bif) = (struct acpi_battery_info *)data.pointer; 180 (*bif) = data.pointer;
181 181
182 return result; 182 return result;
183} 183}
@@ -207,7 +207,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
207 return -ENODEV; 207 return -ENODEV;
208 } 208 }
209 209
210 package = (union acpi_object *)buffer.pointer; 210 package = buffer.pointer;
211 211
212 /* Extract Package Data */ 212 /* Extract Package Data */
213 213
@@ -237,7 +237,7 @@ acpi_battery_get_status(struct acpi_battery *battery,
237 kfree(buffer.pointer); 237 kfree(buffer.pointer);
238 238
239 if (!result) 239 if (!result)
240 (*bst) = (struct acpi_battery_status *)data.pointer; 240 (*bst) = data.pointer;
241 241
242 return result; 242 return result;
243} 243}
@@ -332,7 +332,7 @@ static struct proc_dir_entry *acpi_battery_dir;
332static int acpi_battery_read_info(struct seq_file *seq, void *offset) 332static int acpi_battery_read_info(struct seq_file *seq, void *offset)
333{ 333{
334 int result = 0; 334 int result = 0;
335 struct acpi_battery *battery = (struct acpi_battery *)seq->private; 335 struct acpi_battery *battery = seq->private;
336 struct acpi_battery_info *bif = NULL; 336 struct acpi_battery_info *bif = NULL;
337 char *units = "?"; 337 char *units = "?";
338 338
@@ -416,7 +416,7 @@ static int acpi_battery_info_open_fs(struct inode *inode, struct file *file)
416static int acpi_battery_read_state(struct seq_file *seq, void *offset) 416static int acpi_battery_read_state(struct seq_file *seq, void *offset)
417{ 417{
418 int result = 0; 418 int result = 0;
419 struct acpi_battery *battery = (struct acpi_battery *)seq->private; 419 struct acpi_battery *battery = seq->private;
420 struct acpi_battery_status *bst = NULL; 420 struct acpi_battery_status *bst = NULL;
421 char *units = "?"; 421 char *units = "?";
422 422
@@ -492,7 +492,7 @@ static int acpi_battery_state_open_fs(struct inode *inode, struct file *file)
492 492
493static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) 493static int acpi_battery_read_alarm(struct seq_file *seq, void *offset)
494{ 494{
495 struct acpi_battery *battery = (struct acpi_battery *)seq->private; 495 struct acpi_battery *battery = seq->private;
496 char *units = "?"; 496 char *units = "?";
497 497
498 498
@@ -529,8 +529,8 @@ acpi_battery_write_alarm(struct file *file,
529{ 529{
530 int result = 0; 530 int result = 0;
531 char alarm_string[12] = { '\0' }; 531 char alarm_string[12] = { '\0' };
532 struct seq_file *m = (struct seq_file *)file->private_data; 532 struct seq_file *m = file->private_data;
533 struct acpi_battery *battery = (struct acpi_battery *)m->private; 533 struct acpi_battery *battery = m->private;
534 534
535 535
536 if (!battery || (count > sizeof(alarm_string) - 1)) 536 if (!battery || (count > sizeof(alarm_string) - 1))
@@ -656,7 +656,7 @@ static int acpi_battery_remove_fs(struct acpi_device *device)
656 656
657static void acpi_battery_notify(acpi_handle handle, u32 event, void *data) 657static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
658{ 658{
659 struct acpi_battery *battery = (struct acpi_battery *)data; 659 struct acpi_battery *battery = data;
660 struct acpi_device *device = NULL; 660 struct acpi_device *device = NULL;
661 661
662 662
@@ -740,7 +740,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
740 if (!device || !acpi_driver_data(device)) 740 if (!device || !acpi_driver_data(device))
741 return -EINVAL; 741 return -EINVAL;
742 742
743 battery = (struct acpi_battery *)acpi_driver_data(device); 743 battery = acpi_driver_data(device);
744 744
745 status = acpi_remove_notify_handler(device->handle, 745 status = acpi_remove_notify_handler(device->handle,
746 ACPI_ALL_NOTIFY, 746 ACPI_ALL_NOTIFY,
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 5ef885e82c78..fe914ebc4bbc 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -109,7 +109,7 @@ static struct proc_dir_entry *acpi_button_dir;
109 109
110static int acpi_button_info_seq_show(struct seq_file *seq, void *offset) 110static int acpi_button_info_seq_show(struct seq_file *seq, void *offset)
111{ 111{
112 struct acpi_button *button = (struct acpi_button *)seq->private; 112 struct acpi_button *button = seq->private;
113 113
114 114
115 if (!button || !button->device) 115 if (!button || !button->device)
@@ -128,7 +128,7 @@ static int acpi_button_info_open_fs(struct inode *inode, struct file *file)
128 128
129static int acpi_button_state_seq_show(struct seq_file *seq, void *offset) 129static int acpi_button_state_seq_show(struct seq_file *seq, void *offset)
130{ 130{
131 struct acpi_button *button = (struct acpi_button *)seq->private; 131 struct acpi_button *button = seq->private;
132 acpi_status status; 132 acpi_status status;
133 unsigned long state; 133 unsigned long state;
134 134
@@ -253,7 +253,7 @@ static int acpi_button_remove_fs(struct acpi_device *device)
253 253
254static void acpi_button_notify(acpi_handle handle, u32 event, void *data) 254static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
255{ 255{
256 struct acpi_button *button = (struct acpi_button *)data; 256 struct acpi_button *button = data;
257 257
258 258
259 if (!button || !button->device) 259 if (!button || !button->device)
@@ -275,7 +275,7 @@ static void acpi_button_notify(acpi_handle handle, u32 event, void *data)
275 275
276static acpi_status acpi_button_notify_fixed(void *data) 276static acpi_status acpi_button_notify_fixed(void *data)
277{ 277{
278 struct acpi_button *button = (struct acpi_button *)data; 278 struct acpi_button *button = data;
279 279
280 280
281 if (!button) 281 if (!button)
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 578b99b71d9c..3c3dee844dfc 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -524,7 +524,7 @@ EXPORT_SYMBOL_GPL(unregister_hotplug_dock_device);
524 */ 524 */
525static void dock_notify(acpi_handle handle, u32 event, void *data) 525static void dock_notify(acpi_handle handle, u32 event, void *data)
526{ 526{
527 struct dock_station *ds = (struct dock_station *)data; 527 struct dock_station *ds = data;
528 528
529 switch (event) { 529 switch (event) {
530 case ACPI_NOTIFY_BUS_CHECK: 530 case ACPI_NOTIFY_BUS_CHECK:
@@ -587,7 +587,7 @@ find_dock_devices(acpi_handle handle, u32 lvl, void *context, void **rv)
587{ 587{
588 acpi_status status; 588 acpi_status status;
589 acpi_handle tmp; 589 acpi_handle tmp;
590 struct dock_station *ds = (struct dock_station *)context; 590 struct dock_station *ds = context;
591 struct dock_dependent_device *dd; 591 struct dock_dependent_device *dd;
592 592
593 status = acpi_bus_get_ejd(handle, &tmp); 593 status = acpi_bus_get_ejd(handle, &tmp);
@@ -702,7 +702,7 @@ static int dock_remove(void)
702static acpi_status 702static acpi_status
703find_dock(acpi_handle handle, u32 lvl, void *context, void **rv) 703find_dock(acpi_handle handle, u32 lvl, void *context, void **rv)
704{ 704{
705 int *count = (int *)context; 705 int *count = context;
706 acpi_status status = AE_OK; 706 acpi_status status = AE_OK;
707 707
708 if (is_dock(handle)) { 708 if (is_dock(handle)) {
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index e5d796362854..d560b5e8dd3f 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -716,7 +716,7 @@ static void acpi_ec_gpe_poll_query(void *ec_cxt)
716} 716}
717static void acpi_ec_gpe_intr_query(void *ec_cxt) 717static void acpi_ec_gpe_intr_query(void *ec_cxt)
718{ 718{
719 union acpi_ec *ec = (union acpi_ec *)ec_cxt; 719 union acpi_ec *ec = ec_cxt;
720 u32 value; 720 u32 value;
721 int result = -ENODATA; 721 int result = -ENODATA;
722 static char object_name[5] = { '_', 'Q', '0', '0', '\0' }; 722 static char object_name[5] = { '_', 'Q', '0', '0', '\0' };
@@ -752,7 +752,7 @@ static u32 acpi_ec_gpe_handler(void *data)
752static u32 acpi_ec_gpe_poll_handler(void *data) 752static u32 acpi_ec_gpe_poll_handler(void *data)
753{ 753{
754 acpi_status status = AE_OK; 754 acpi_status status = AE_OK;
755 union acpi_ec *ec = (union acpi_ec *)data; 755 union acpi_ec *ec = data;
756 756
757 if (!ec) 757 if (!ec)
758 return ACPI_INTERRUPT_NOT_HANDLED; 758 return ACPI_INTERRUPT_NOT_HANDLED;
@@ -770,7 +770,7 @@ static u32 acpi_ec_gpe_intr_handler(void *data)
770{ 770{
771 acpi_status status = AE_OK; 771 acpi_status status = AE_OK;
772 u32 value; 772 u32 value;
773 union acpi_ec *ec = (union acpi_ec *)data; 773 union acpi_ec *ec = data;
774 774
775 if (!ec) 775 if (!ec)
776 return ACPI_INTERRUPT_NOT_HANDLED; 776 return ACPI_INTERRUPT_NOT_HANDLED;
@@ -848,7 +848,7 @@ acpi_ec_space_handler(u32 function,
848 return AE_BAD_PARAMETER; 848 return AE_BAD_PARAMETER;
849 } 849 }
850 850
851 ec = (union acpi_ec *)handler_context; 851 ec = handler_context;
852 852
853 next_byte: 853 next_byte:
854 switch (function) { 854 switch (function) {
@@ -905,7 +905,7 @@ static struct proc_dir_entry *acpi_ec_dir;
905 905
906static int acpi_ec_read_info(struct seq_file *seq, void *offset) 906static int acpi_ec_read_info(struct seq_file *seq, void *offset)
907{ 907{
908 union acpi_ec *ec = (union acpi_ec *)seq->private; 908 union acpi_ec *ec = seq->private;
909 909
910 910
911 if (!ec) 911 if (!ec)
@@ -1136,7 +1136,7 @@ static int acpi_ec_remove(struct acpi_device *device, int type)
1136static acpi_status 1136static acpi_status
1137acpi_ec_io_ports(struct acpi_resource *resource, void *context) 1137acpi_ec_io_ports(struct acpi_resource *resource, void *context)
1138{ 1138{
1139 union acpi_ec *ec = (union acpi_ec *)context; 1139 union acpi_ec *ec = context;
1140 struct acpi_generic_address *addr; 1140 struct acpi_generic_address *addr;
1141 1141
1142 if (resource->type != ACPI_RESOURCE_TYPE_IO) { 1142 if (resource->type != ACPI_RESOURCE_TYPE_IO) {
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 10f160dc75b1..ba5686fa4750 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -96,7 +96,7 @@ struct acpi_find_pci_root {
96static acpi_status 96static acpi_status
97do_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) 97do_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 &&
@@ -217,7 +217,7 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
217 acpi_status status; 217 acpi_status status;
218 struct acpi_device_info *info; 218 struct acpi_device_info *info;
219 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; 219 struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL };
220 struct acpi_find_child *find = (struct acpi_find_child *)context; 220 struct acpi_find_child *find = context;
221 221
222 status = acpi_get_object_info(handle, &buffer); 222 status = acpi_get_object_info(handle, &buffer);
223 if (ACPI_SUCCESS(status)) { 223 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
266static int hotkey_polling_seq_show(struct seq_file *seq, void *offset) 266static 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
394struct acpi_ec_hc *acpi_get_ec_hc(struct acpi_device *device) 394struct 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
399EXPORT_SYMBOL(acpi_get_ec_hc); 399EXPORT_SYMBOL(acpi_get_ec_hc);
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c
index 15fc12482ba0..6fbb42048890 100644
--- a/drivers/acpi/ibm_acpi.c
+++ b/drivers/acpi/ibm_acpi.c
@@ -1721,7 +1721,7 @@ static struct ibm_struct ibms[] = {
1721static int dispatch_read(char *page, char **start, off_t off, int count, 1721static int dispatch_read(char *page, char **start, off_t off, int count,
1722 int *eof, void *data) 1722 int *eof, void *data)
1723{ 1723{
1724 struct ibm_struct *ibm = (struct ibm_struct *)data; 1724 struct ibm_struct *ibm = data;
1725 int len; 1725 int len;
1726 1726
1727 if (!ibm || !ibm->read) 1727 if (!ibm || !ibm->read)
@@ -1746,7 +1746,7 @@ static int dispatch_read(char *page, char **start, off_t off, int count,
1746static int dispatch_write(struct file *file, const char __user * userbuf, 1746static int dispatch_write(struct file *file, const char __user * userbuf,
1747 unsigned long count, void *data) 1747 unsigned long count, void *data)
1748{ 1748{
1749 struct ibm_struct *ibm = (struct ibm_struct *)data; 1749 struct ibm_struct *ibm = data;
1750 char *kernbuf; 1750 char *kernbuf;
1751 int ret; 1751 int ret;
1752 1752
@@ -1775,7 +1775,7 @@ static int dispatch_write(struct file *file, const char __user * userbuf,
1775 1775
1776static void dispatch_notify(acpi_handle handle, u32 event, void *data) 1776static void dispatch_notify(acpi_handle handle, u32 event, void *data)
1777{ 1777{
1778 struct ibm_struct *ibm = (struct ibm_struct *)data; 1778 struct ibm_struct *ibm = data;
1779 1779
1780 if (!ibm || !ibm->notify) 1780 if (!ibm || !ibm->notify)
1781 return; 1781 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 068fe4f100b0..2ed2d701f6e1 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -569,7 +569,7 @@ static void acpi_os_execute_deferred(void *context)
569 struct acpi_os_dpc *dpc = NULL; 569 struct acpi_os_dpc *dpc = NULL;
570 570
571 571
572 dpc = (struct acpi_os_dpc *)context; 572 dpc = context;
573 if (!dpc) { 573 if (!dpc) {
574 printk(KERN_ERR PREFIX "Invalid (NULL) context\n"); 574 printk(KERN_ERR PREFIX "Invalid (NULL) context\n");
575 return; 575 return;
@@ -1060,7 +1060,7 @@ acpi_os_create_cache(char *name, u16 size, u16 depth, acpi_cache_t ** cache)
1060 1060
1061acpi_status acpi_os_purge_cache(acpi_cache_t * cache) 1061acpi_status acpi_os_purge_cache(acpi_cache_t * cache)
1062{ 1062{
1063 (void)kmem_cache_shrink(cache); 1063 kmem_cache_shrink(cache);
1064 return (AE_OK); 1064 return (AE_OK);
1065} 1065}
1066 1066
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 7f3e7e77e794..6718198bfae7 100644
--- a/drivers/acpi/pci_link.c
+++ b/drivers/acpi/pci_link.c
@@ -103,7 +103,7 @@ DEFINE_MUTEX(acpi_link_lock);
103static acpi_status 103static acpi_status
104acpi_pci_link_check_possible(struct acpi_resource *resource, void *context) 104acpi_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);
119static acpi_status 119static acpi_status
120get_root_bridge_busnr_callback(struct acpi_resource *resource, void *data) 120get_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 fec225d1b6b7..e9dab54bd541 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
@@ -445,7 +445,7 @@ static int acpi_power_seq_show(struct seq_file *seq, void *offset)
445 struct acpi_power_resource *resource = NULL; 445 struct acpi_power_resource *resource = NULL;
446 446
447 447
448 resource = (struct acpi_power_resource *)seq->private; 448 resource = seq->private;
449 449
450 if (!resource) 450 if (!resource)
451 goto end; 451 goto end;
@@ -593,7 +593,7 @@ static int acpi_power_remove(struct acpi_device *device, int type)
593 if (!device || !acpi_driver_data(device)) 593 if (!device || !acpi_driver_data(device))
594 return -EINVAL; 594 return -EINVAL;
595 595
596 resource = (struct acpi_power_resource *)acpi_driver_data(device); 596 resource = acpi_driver_data(device);
597 597
598 acpi_power_remove_fs(device); 598 acpi_power_remove_fs(device);
599 599
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index b13d64415b7a..44c624bd40cb 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
278static int acpi_processor_info_seq_show(struct seq_file *seq, void *offset) 278static 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 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 acpi_processor_start(struct acpi_device *device)
578 578
579static void acpi_processor_notify(acpi_handle handle, u32 event, void *data) 579static 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 0a395fca843b..4504684671f6 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -671,7 +671,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
671 return -ENODEV; 671 return -ENODEV;
672 } 672 }
673 673
674 cst = (union acpi_object *)buffer.pointer; 674 cst = buffer.pointer;
675 675
676 /* There must be at least 2 elements */ 676 /* There must be at least 2 elements */
677 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) { 677 if (!cst || (cst->type != ACPI_TYPE_PACKAGE) || cst->package.count < 2) {
@@ -700,14 +700,14 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
700 700
701 memset(&cx, 0, sizeof(cx)); 701 memset(&cx, 0, sizeof(cx));
702 702
703 element = (union acpi_object *)&(cst->package.elements[i]); 703 element = &(cst->package.elements[i]);
704 if (element->type != ACPI_TYPE_PACKAGE) 704 if (element->type != ACPI_TYPE_PACKAGE)
705 continue; 705 continue;
706 706
707 if (element->package.count != 4) 707 if (element->package.count != 4)
708 continue; 708 continue;
709 709
710 obj = (union acpi_object *)&(element->package.elements[0]); 710 obj = &(element->package.elements[0]);
711 711
712 if (obj->type != ACPI_TYPE_BUFFER) 712 if (obj->type != ACPI_TYPE_BUFFER)
713 continue; 713 continue;
@@ -722,7 +722,7 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
722 0 : reg->address; 722 0 : reg->address;
723 723
724 /* There should be an easy way to extract an integer... */ 724 /* There should be an easy way to extract an integer... */
725 obj = (union acpi_object *)&(element->package.elements[1]); 725 obj = &(element->package.elements[1]);
726 if (obj->type != ACPI_TYPE_INTEGER) 726 if (obj->type != ACPI_TYPE_INTEGER)
727 continue; 727 continue;
728 728
@@ -735,13 +735,13 @@ static int acpi_processor_get_power_info_cst(struct acpi_processor *pr)
735 if ((cx.type < ACPI_STATE_C2) || (cx.type > ACPI_STATE_C3)) 735 if ((cx.type < ACPI_STATE_C2) || (cx.type > ACPI_STATE_C3))
736 continue; 736 continue;
737 737
738 obj = (union acpi_object *)&(element->package.elements[2]); 738 obj = &(element->package.elements[2]);
739 if (obj->type != ACPI_TYPE_INTEGER) 739 if (obj->type != ACPI_TYPE_INTEGER)
740 continue; 740 continue;
741 741
742 cx.latency = obj->integer.value; 742 cx.latency = obj->integer.value;
743 743
744 obj = (union acpi_object *)&(element->package.elements[3]); 744 obj = &(element->package.elements[3]);
745 if (obj->type != ACPI_TYPE_INTEGER) 745 if (obj->type != ACPI_TYPE_INTEGER)
746 continue; 746 continue;
747 747
@@ -1004,7 +1004,7 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr)
1004 1004
1005static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset) 1005static int acpi_processor_power_seq_show(struct seq_file *seq, void *offset)
1006{ 1006{
1007 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 1007 struct acpi_processor *pr = seq->private;
1008 unsigned int i; 1008 unsigned int i;
1009 1009
1010 1010
diff --git a/drivers/acpi/processor_perflib.c b/drivers/acpi/processor_perflib.c
index 7ba5e49ab302..39fdbcc37d43 100644
--- a/drivers/acpi/processor_perflib.c
+++ b/drivers/acpi/processor_perflib.c
@@ -238,7 +238,7 @@ static int acpi_processor_get_performance_states(struct acpi_processor *pr)
238 return -ENODEV; 238 return -ENODEV;
239 } 239 }
240 240
241 pss = (union acpi_object *)buffer.pointer; 241 pss = buffer.pointer;
242 if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) { 242 if (!pss || (pss->type != ACPI_TYPE_PACKAGE)) {
243 printk(KERN_ERR PREFIX "Invalid _PSS data\n"); 243 printk(KERN_ERR PREFIX "Invalid _PSS data\n");
244 result = -EFAULT; 244 result = -EFAULT;
@@ -412,7 +412,7 @@ static struct file_operations acpi_processor_perf_fops = {
412 412
413static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset) 413static int acpi_processor_perf_seq_show(struct seq_file *seq, void *offset)
414{ 414{
415 struct acpi_processor *pr = (struct acpi_processor *)seq->private; 415 struct acpi_processor *pr = seq->private;
416 int i; 416 int i;
417 417
418 418
@@ -453,8 +453,8 @@ acpi_processor_write_performance(struct file *file,
453 size_t count, loff_t * data) 453 size_t count, loff_t * data)
454{ 454{
455 int result = 0; 455 int result = 0;
456 struct seq_file *m = (struct seq_file *)file->private_data; 456 struct seq_file *m = file->private_data;
457 struct acpi_processor *pr = (struct acpi_processor *)m->private; 457 struct acpi_processor *pr = m->private;
458 struct acpi_processor_performance *perf; 458 struct acpi_processor_performance *perf;
459 char state_string[12] = { '\0' }; 459 char state_string[12] = { '\0' };
460 unsigned int new_state = 0; 460 unsigned int new_state = 0;
@@ -553,7 +553,7 @@ static int acpi_processor_get_psd(struct acpi_processor *pr)
553 return -ENODEV; 553 return -ENODEV;
554 } 554 }
555 555
556 psd = (union acpi_object *) buffer.pointer; 556 psd = buffer.pointer;
557 if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) { 557 if (!psd || (psd->type != ACPI_TYPE_PACKAGE)) {
558 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n")); 558 ACPI_DEBUG_PRINT((ACPI_DB_ERROR, "Invalid _PSD data\n"));
559 result = -EFAULT; 559 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)
259static int acpi_processor_throttling_seq_show(struct seq_file *seq, 259static 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 62bef0b3b614..c6a819adcc9e 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
924static int acpi_battery_read_info(struct seq_file *seq, void *offset) 924static 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
1077static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) 1077static 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
1125acpi_battery_write_alarm(struct file *file, const char __user * buffer, 1125acpi_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
1218static int acpi_ac_read_state(struct seq_file *seq, void *offset) 1218static 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
1686int acpi_sbs_remove(struct acpi_device *device, int type) 1686int acpi_sbs_remove(struct acpi_device *device, int type)
1687{ 1687{
1688 struct acpi_sbs *sbs = (struct acpi_sbs *)acpi_driver_data(device); 1688 struct acpi_sbs *sbs = acpi_driver_data(device);
1689 int id; 1689 int id;
1690 1690
1691 if (!device || !sbs) { 1691 if (!device || !sbs) {
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)
228static int 228static int
229acpi_table_compute_checksum(void *table_pointer, unsigned long length) 229acpi_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)
663static void acpi_thermal_check(void *data) 663static 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
779static int acpi_thermal_state_seq_show(struct seq_file *seq, void *offset) 779static 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)
813static int acpi_thermal_temp_seq_show(struct seq_file *seq, void *offset) 813static 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
838static int acpi_thermal_trip_seq_show(struct seq_file *seq, void *offset) 838static 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
954static int acpi_thermal_cooling_seq_show(struct seq_file *seq, void *offset) 954static 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
1015static int acpi_thermal_polling_seq_show(struct seq_file *seq, void *offset) 1015static 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
1171static void acpi_thermal_notify(acpi_handle handle, u32 event, void *data) 1171static 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
655static int acpi_video_device_info_seq_show(struct seq_file *seq, void *offset) 655static 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)
688static int acpi_video_device_state_seq_show(struct seq_file *seq, void *offset) 687static 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,
754static int 752static int
755acpi_video_device_brightness_seq_show(struct seq_file *seq, void *offset) 753acpi_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
818static int acpi_video_device_EDID_seq_show(struct seq_file *seq, void *offset) 815static 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 */
951static int acpi_video_bus_info_seq_show(struct seq_file *seq, void *offset) 947static 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
976static int acpi_video_bus_ROM_seq_show(struct seq_file *seq, void *offset) 972static 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
996static int acpi_video_bus_POST_info_seq_show(struct seq_file *seq, void *offset) 992static 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
1034static int acpi_video_bus_POST_seq_show(struct seq_file *seq, void *offset) 1030static 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
1055static int acpi_video_bus_DOS_seq_show(struct seq_file *seq, void *offset) 1051static 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
1613static void acpi_video_bus_notify(acpi_handle handle, u32 event, void *data) 1609static 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
1655static void acpi_video_device_notify(acpi_handle handle, u32 event, void *data) 1651static 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