提交 47a08c85 编写于 作者: L Luis G.F 提交者: Rafael J. Wysocki

ACPI / battery: Fix incorrect sscanf() string in acpi_battery_init_alarm()

Fix incorrect sscanf() string in acpi_battery_init_alarm().
Change from %ld to %lu, because 'x' is unsigned long.
Signed-off-by: NLuis G.F <luisgf@luisgf.es>
Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
上级 085ca117
......@@ -549,7 +549,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
{
unsigned long x;
struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
if (sscanf(buf, "%ld\n", &x) == 1)
if (sscanf(buf, "%lu\n", &x) == 1)
battery->alarm = x/1000;
if (acpi_battery_present(battery))
acpi_battery_set_alarm(battery);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册