diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2009-09-21 15:29:10 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2009-09-25 14:24:25 -0400 |
commit | caaa6efb3d82d0102db9e7094ca5773c46e6780c (patch) | |
tree | 43e7cdc207c3f9b091bfbd638d4e98fe81a5a113 | |
parent | 66b7ed40aaf153d634aabff409a0dda675f37f45 (diff) |
ACPI: save device_type in acpi_device
Most uses of the ACPI bus device_type (ACPI_BUS_TYPE_DEVICE,
ACPI_BUS_TYPE_POWER, etc) are during device initialization, but
we do need it later for notify handler installation, since that
is different for fixed hardware devices vs. namespace devices.
This patch saves the device_type in the acpi_device structure,
so we can check that rather than comparing against the _HID string.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/scan.c | 1 | ||||
-rw-r--r-- | include/acpi/acpi_bus.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index ab5a26469707..c73681b7e69e 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -1240,6 +1240,7 @@ acpi_add_single_object(struct acpi_device **child, | |||
1240 | return -ENOMEM; | 1240 | return -ENOMEM; |
1241 | } | 1241 | } |
1242 | 1242 | ||
1243 | device->device_type = type; | ||
1243 | device->handle = handle; | 1244 | device->handle = handle; |
1244 | device->parent = parent; | 1245 | device->parent = parent; |
1245 | device->bus_ops = *ops; /* workround for not call .start */ | 1246 | device->bus_ops = *ops; /* workround for not call .start */ |
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 1cef1398e358..8456e8cbf9fd 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h | |||
@@ -262,7 +262,8 @@ struct acpi_device_wakeup { | |||
262 | /* Device */ | 262 | /* Device */ |
263 | 263 | ||
264 | struct acpi_device { | 264 | struct acpi_device { |
265 | acpi_handle handle; | 265 | int device_type; |
266 | acpi_handle handle; /* no handle for fixed hardware */ | ||
266 | struct acpi_device *parent; | 267 | struct acpi_device *parent; |
267 | struct list_head children; | 268 | struct list_head children; |
268 | struct list_head node; | 269 | struct list_head node; |