diff options
Diffstat (limited to 'drivers/acpi/sbs.c')
-rw-r--r-- | drivers/acpi/sbs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index d465ae6cdd00..dbd48498b938 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
@@ -450,7 +450,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev, | |||
450 | { | 450 | { |
451 | unsigned long x; | 451 | unsigned long x; |
452 | struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); | 452 | struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); |
453 | if (sscanf(buf, "%ld\n", &x) == 1) | 453 | if (sscanf(buf, "%lu\n", &x) == 1) |
454 | battery->alarm_capacity = x / | 454 | battery->alarm_capacity = x / |
455 | (1000 * acpi_battery_scale(battery)); | 455 | (1000 * acpi_battery_scale(battery)); |
456 | if (battery->present) | 456 | if (battery->present) |
@@ -668,6 +668,8 @@ static int acpi_sbs_resume(struct device *dev) | |||
668 | acpi_sbs_callback(sbs); | 668 | acpi_sbs_callback(sbs); |
669 | return 0; | 669 | return 0; |
670 | } | 670 | } |
671 | #else | ||
672 | #define acpi_sbs_resume NULL | ||
671 | #endif | 673 | #endif |
672 | 674 | ||
673 | static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume); | 675 | static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume); |