aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/battery.c2
-rw-r--r--drivers/acpi/container.c5
-rw-r--r--drivers/acpi/dock.c5
-rw-r--r--drivers/acpi/proc.c2
-rw-r--r--drivers/acpi/scan.c6
-rw-r--r--drivers/acpi/utils.c4
-rw-r--r--drivers/acpi/video_detect.c8
7 files changed, 20 insertions, 12 deletions
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 470e7542bf31..018a42883706 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -549,7 +549,7 @@ static ssize_t acpi_battery_alarm_store(struct device *dev,
549{ 549{
550 unsigned long x; 550 unsigned long x;
551 struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev)); 551 struct acpi_battery *battery = to_acpi_battery(dev_get_drvdata(dev));
552 if (sscanf(buf, "%ld\n", &x) == 1) 552 if (sscanf(buf, "%lu\n", &x) == 1)
553 battery->alarm = x/1000; 553 battery->alarm = x/1000;
554 if (acpi_battery_present(battery)) 554 if (acpi_battery_present(battery))
555 acpi_battery_set_alarm(battery); 555 acpi_battery_set_alarm(battery);
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index 0b6ae6eb5c4a..368f9ddb8480 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -79,9 +79,10 @@ static int container_device_attach(struct acpi_device *adev,
79 ACPI_COMPANION_SET(dev, adev); 79 ACPI_COMPANION_SET(dev, adev);
80 dev->release = acpi_container_release; 80 dev->release = acpi_container_release;
81 ret = device_register(dev); 81 ret = device_register(dev);
82 if (ret) 82 if (ret) {
83 put_device(dev);
83 return ret; 84 return ret;
84 85 }
85 adev->driver_data = dev; 86 adev->driver_data = dev;
86 return 1; 87 return 1;
87} 88}
diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c
index c431c88faaff..e9b3081c4fe9 100644
--- a/drivers/acpi/dock.c
+++ b/drivers/acpi/dock.c
@@ -609,7 +609,7 @@ static int handle_eject_request(struct dock_station *ds, u32 event)
609static void dock_notify(struct dock_station *ds, u32 event) 609static void dock_notify(struct dock_station *ds, u32 event)
610{ 610{
611 acpi_handle handle = ds->handle; 611 acpi_handle handle = ds->handle;
612 struct acpi_device *ad; 612 struct acpi_device *adev = NULL;
613 int surprise_removal = 0; 613 int surprise_removal = 0;
614 614
615 /* 615 /*
@@ -632,7 +632,8 @@ static void dock_notify(struct dock_station *ds, u32 event)
632 switch (event) { 632 switch (event) {
633 case ACPI_NOTIFY_BUS_CHECK: 633 case ACPI_NOTIFY_BUS_CHECK:
634 case ACPI_NOTIFY_DEVICE_CHECK: 634 case ACPI_NOTIFY_DEVICE_CHECK:
635 if (!dock_in_progress(ds) && acpi_bus_get_device(handle, &ad)) { 635 acpi_bus_get_device(handle, &adev);
636 if (!dock_in_progress(ds) && !acpi_device_enumerated(adev)) {
636 begin_dock(ds); 637 begin_dock(ds);
637 dock(ds); 638 dock(ds);
638 if (!dock_present(ds)) { 639 if (!dock_present(ds)) {
diff --git a/drivers/acpi/proc.c b/drivers/acpi/proc.c
index 50fe34ffe932..75c28eae8860 100644
--- a/drivers/acpi/proc.c
+++ b/drivers/acpi/proc.c
@@ -60,7 +60,7 @@ acpi_system_wakeup_device_seq_show(struct seq_file *seq, void *offset)
60 seq_printf(seq, "%c%-8s %s:%s\n", 60 seq_printf(seq, "%c%-8s %s:%s\n",
61 dev->wakeup.flags.run_wake ? '*' : ' ', 61 dev->wakeup.flags.run_wake ? '*' : ' ',
62 (device_may_wakeup(&dev->dev) || 62 (device_may_wakeup(&dev->dev) ||
63 (ldev && device_may_wakeup(ldev))) ? 63 device_may_wakeup(ldev)) ?
64 "enabled" : "disabled", 64 "enabled" : "disabled",
65 ldev->bus ? ldev->bus->name : 65 ldev->bus ? ldev->bus->name :
66 "no-bus", dev_name(ldev)); 66 "no-bus", dev_name(ldev));
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 7384158c7f87..57b053f424d1 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -484,7 +484,6 @@ static void acpi_device_hotplug(void *data, u32 src)
484static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data) 484static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data)
485{ 485{
486 u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE; 486 u32 ost_code = ACPI_OST_SC_NON_SPECIFIC_FAILURE;
487 struct acpi_scan_handler *handler = data;
488 struct acpi_device *adev; 487 struct acpi_device *adev;
489 acpi_status status; 488 acpi_status status;
490 489
@@ -500,7 +499,10 @@ static void acpi_hotplug_notify_cb(acpi_handle handle, u32 type, void *data)
500 break; 499 break;
501 case ACPI_NOTIFY_EJECT_REQUEST: 500 case ACPI_NOTIFY_EJECT_REQUEST:
502 acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n"); 501 acpi_handle_debug(handle, "ACPI_NOTIFY_EJECT_REQUEST event\n");
503 if (!handler->hotplug.enabled) { 502 if (!adev->handler)
503 goto err_out;
504
505 if (!adev->handler->hotplug.enabled) {
504 acpi_handle_err(handle, "Eject disabled\n"); 506 acpi_handle_err(handle, "Eject disabled\n");
505 ost_code = ACPI_OST_SC_EJECT_NOT_SUPPORTED; 507 ost_code = ACPI_OST_SC_EJECT_NOT_SUPPORTED;
506 goto err_out; 508 goto err_out;
diff --git a/drivers/acpi/utils.c b/drivers/acpi/utils.c
index 0347a37eb438..85e3b612bdc0 100644
--- a/drivers/acpi/utils.c
+++ b/drivers/acpi/utils.c
@@ -99,10 +99,6 @@ acpi_extract_package(union acpi_object *package,
99 99
100 union acpi_object *element = &(package->package.elements[i]); 100 union acpi_object *element = &(package->package.elements[i]);
101 101
102 if (!element) {
103 return AE_BAD_DATA;
104 }
105
106 switch (element->type) { 102 switch (element->type) {
107 103
108 case ACPI_TYPE_INTEGER: 104 case ACPI_TYPE_INTEGER:
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index f0447d3daf2c..a697b77b8865 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -170,6 +170,14 @@ static struct dmi_system_id video_detect_dmi_table[] = {
170 }, 170 },
171 { 171 {
172 .callback = video_detect_force_vendor, 172 .callback = video_detect_force_vendor,
173 .ident = "HP EliteBook Revolve 810",
174 .matches = {
175 DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
176 DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook Revolve 810 G1"),
177 },
178 },
179 {
180 .callback = video_detect_force_vendor,
173 .ident = "Lenovo Yoga 13", 181 .ident = "Lenovo Yoga 13",
174 .matches = { 182 .matches = {
175 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), 183 DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),