Skip to content

Commit

Permalink
Merge branch 'acpi-fixes'
Browse files Browse the repository at this point in the history
* acpi-fixes:
  ACPI / video: ignore BIOS initial backlight value for Fujitsu E753
  PNP / ACPI: avoid garbage in resource name
  ACPI / memhotplug: Fix a stale pointer in error path
  ACPI / scan: Always call acpi_bus_scan() for bus check notifications
  ACPI / scan: Do not try to attach scan handlers to devices having them
  • Loading branch information
Rafael J. Wysocki committed Jul 18, 2013
2 parents ad81f05 + 9657a56 commit fc0ad6c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@ static int acpi_memory_device_add(struct acpi_device *device,
/* Get the range from the _CRS */
result = acpi_memory_get_device_resources(mem_device);
if (result) {
device->driver_data = NULL;
kfree(mem_device);
return result;
}
Expand Down
13 changes: 9 additions & 4 deletions drivers/acpi/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,12 @@ static void acpi_scan_bus_device_check(acpi_handle handle, u32 ost_source)
mutex_lock(&acpi_scan_lock);
lock_device_hotplug();

acpi_bus_get_device(handle, &device);
if (device) {
dev_warn(&device->dev, "Attempt to re-insert\n");
goto out;
if (ost_source != ACPI_NOTIFY_BUS_CHECK) {
acpi_bus_get_device(handle, &device);
if (device) {
dev_warn(&device->dev, "Attempt to re-insert\n");
goto out;
}
}
acpi_evaluate_hotplug_ost(handle, ost_source,
ACPI_OST_SC_INSERT_IN_PROGRESS, NULL);
Expand Down Expand Up @@ -1981,6 +1983,9 @@ static acpi_status acpi_bus_device_attach(acpi_handle handle, u32 lvl_not_used,
if (acpi_bus_get_device(handle, &device))
return AE_CTRL_DEPTH;

if (device->handler)
return AE_OK;

ret = acpi_scan_attach_handler(device);
if (ret)
return ret > 0 ? AE_OK : AE_CTRL_DEPTH;
Expand Down
8 changes: 8 additions & 0 deletions drivers/acpi/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,14 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"),
},
},
{
.callback = video_ignore_initial_backlight,
.ident = "Fujitsu E753",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "FUJITSU"),
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E753"),
},
},
{
.callback = video_ignore_initial_backlight,
.ident = "HP Pavilion dm4",
Expand Down
2 changes: 1 addition & 1 deletion drivers/pnp/pnpacpi/rsparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static acpi_status pnpacpi_allocated_resource(struct acpi_resource *res,
struct pnp_dev *dev = data;
struct acpi_resource_dma *dma;
struct acpi_resource_vendor_typed *vendor_typed;
struct resource r;
struct resource r = {0};
int i, flags;

if (acpi_dev_resource_memory(res, &r)
Expand Down
1 change: 1 addition & 0 deletions drivers/pnp/resource.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ struct pnp_resource *pnp_add_resource(struct pnp_dev *dev,
}

pnp_res->res = *res;
pnp_res->res.name = dev->name;
dev_dbg(&dev->dev, "%pR\n", res);
return pnp_res;
}
Expand Down

0 comments on commit fc0ad6c

Please sign in to comment.