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 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, |