summaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-09-21 21:29:10 +0200
committerLen Brown <len.brown@intel.com>2009-09-25 20:24:25 +0200
commitcaaa6efb3d82d0102db9e7094ca5773c46e6780c (patch)
tree43e7cdc207c3f9b091bfbd638d4e98fe81a5a113 /drivers/acpi
parentACPI: remove redundant "handle" and "parent" arguments (diff)
downloadlinux-caaa6efb3d82d0102db9e7094ca5773c46e6780c.tar.xz
linux-caaa6efb3d82d0102db9e7094ca5773c46e6780c.zip
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>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/scan.c1
1 files changed, 1 insertions, 0 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,
return -ENOMEM;
}
+ device->device_type = type;
device->handle = handle;
device->parent = parent;
device->bus_ops = *ops; /* workround for not call .start */