diff options
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r-- | drivers/acpi/battery.c | 22 |
1 files changed, 11 insertions, 11 deletions
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; | |||
332 | static int acpi_battery_read_info(struct seq_file *seq, void *offset) | 332 | static 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) | |||
416 | static int acpi_battery_read_state(struct seq_file *seq, void *offset) | 416 | static 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 | ||
493 | static int acpi_battery_read_alarm(struct seq_file *seq, void *offset) | 493 | static 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 | ||
657 | static void acpi_battery_notify(acpi_handle handle, u32 event, void *data) | 657 | static 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, |