Skip to content

Commit

Permalink
Merge branches 'acpi-cleanup' and 'acpi-video'
Browse files Browse the repository at this point in the history
* acpi-cleanup:
  ACPI / battery: Fix incorrect sscanf() string in acpi_battery_init_alarm()
  ACPI / proc: remove unneeded NULL check
  ACPI / utils: remove a pointless NULL check

* acpi-video:
  ACPI / video: Add HP EliteBook Revolve 810 to the blacklist
  • Loading branch information
Rafael J. Wysocki committed Feb 6, 2014
3 parents 7fd9050 + 47a08c8 + e18ac62 commit a2ff34c
Showing 4 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion drivers/acpi/battery.c
Original file line number Diff line number Diff line change
@@ -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);
2 changes: 1 addition & 1 deletion drivers/acpi/proc.c
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
seq_printf(seq, "%c%-8s %s:%s\n",
dev->wakeup.flags.run_wake ? '*' : ' ',
(device_may_wakeup(&dev->dev) ||
(ldev && device_may_wakeup(ldev))) ?
device_may_wakeup(ldev)) ?
"enabled" : "disabled",
ldev->bus ? ldev->bus->name :
"no-bus", dev_name(ldev));
4 changes: 0 additions & 4 deletions drivers/acpi/utils.c
Original file line number Diff line number Diff line change
@@ -99,10 +99,6 @@ acpi_extract_package(union acpi_object *package,

union acpi_object *element = &(package->package.elements[i]);

if (!element) {
return AE_BAD_DATA;
}

switch (element->type) {

case ACPI_TYPE_INTEGER:
8 changes: 8 additions & 0 deletions drivers/acpi/video_detect.c
Original file line number Diff line number Diff line change
@@ -170,6 +170,14 @@ static struct dmi_system_id video_detect_dmi_table[] = {
},
{
.callback = video_detect_force_vendor,
.ident = "HP EliteBook Revolve 810",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook Revolve 810 G1"),
},
},
{
.callback = video_detect_force_vendor,
.ident = "Lenovo Yoga 13",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),

0 comments on commit a2ff34c

Please sign in to comment.