aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/battery.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi/battery.c')
-rw-r--r--drivers/acpi/battery.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index cada73ffdfa7..58d2c91ba62b 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -324,8 +324,8 @@ static int extract_package(struct acpi_battery *battery,
324 strncpy(ptr, element->string.pointer, 32); 324 strncpy(ptr, element->string.pointer, 32);
325 else if (element->type == ACPI_TYPE_INTEGER) { 325 else if (element->type == ACPI_TYPE_INTEGER) {
326 strncpy(ptr, (u8 *)&element->integer.value, 326 strncpy(ptr, (u8 *)&element->integer.value,
327 sizeof(acpi_integer)); 327 sizeof(u64));
328 ptr[sizeof(acpi_integer)] = 0; 328 ptr[sizeof(u64)] = 0;
329 } else 329 } else
330 *ptr = 0; /* don't have value */ 330 *ptr = 0; /* don't have value */
331 } else { 331 } else {