diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/bus.c | 1 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 75a61626eddd..07f604832fd6 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c @@ -1043,6 +1043,7 @@ struct bus_type acpi_bus_type = { .remove = acpi_device_remove, .uevent = acpi_device_uevent, }; +EXPORT_SYMBOL_GPL(acpi_bus_type); /* -------------------------------------------------------------------------- Initialization/Cleanup diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 1185ecea59d1..c215bc8723d0 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -19,6 +19,7 @@ #include <linux/dma-map-ops.h> #include <linux/platform_data/x86/apple.h> #include <linux/pgtable.h> +#include <linux/crc32.h> #include "internal.h" @@ -667,6 +668,19 @@ static int acpi_tie_acpi_dev(struct acpi_device *adev) return 0; } +static void acpi_store_pld_crc(struct acpi_device *adev) +{ + struct acpi_pld_info *pld; + acpi_status status; + + status = acpi_get_physical_device_location(adev->handle, &pld); + if (ACPI_FAILURE(status)) + return; + + adev->pld_crc = crc32(~0, pld, sizeof(*pld)); + ACPI_FREE(pld); +} + static int __acpi_device_add(struct acpi_device *device, void (*release)(struct device *)) { @@ -725,6 +739,8 @@ static int __acpi_device_add(struct acpi_device *device, if (device->wakeup.flags.valid) list_add_tail(&device->wakeup_list, &acpi_wakeup_device_list); + acpi_store_pld_crc(device); + mutex_unlock(&acpi_device_lock); if (device->parent) |