aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2009-09-21 15:35:19 -0400
committerLen Brown <len.brown@intel.com>2009-09-25 15:09:31 -0400
commit7f47fa6c2ff15f5e59cdbb350f86faef6829294a (patch)
tree02167bcbc5e6fd4eee044798ef142ff604d8eab1 /include/acpi
parentb1fbfb2ae8f2f0e04219218da6f52f7313466899 (diff)
ACPI: maintain a single list of _HID and _CID IDs
There's no need to treat _HID and _CID differently. Keeping them in a single list makes code that uses the IDs a little simpler because it can just traverse the list rather than checking "do we have a HID?", "do we have any CIDs?" Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/acpi_bus.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index 670f7f33837e..c2c434626edc 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -171,19 +171,23 @@ typedef unsigned long acpi_bus_address;
171typedef char acpi_device_name[40]; 171typedef char acpi_device_name[40];
172typedef char acpi_device_class[20]; 172typedef char acpi_device_class[20];
173 173
174struct acpi_hardware_id {
175 struct list_head list;
176 char *id;
177};
178
174struct acpi_device_pnp { 179struct acpi_device_pnp {
175 acpi_bus_id bus_id; /* Object name */ 180 acpi_bus_id bus_id; /* Object name */
176 acpi_bus_address bus_address; /* _ADR */ 181 acpi_bus_address bus_address; /* _ADR */
177 char *hardware_id; /* _HID */
178 struct acpica_device_id_list *cid_list; /* _CIDs */
179 char *unique_id; /* _UID */ 182 char *unique_id; /* _UID */
183 struct list_head ids; /* _HID and _CIDs */
180 acpi_device_name device_name; /* Driver-determined */ 184 acpi_device_name device_name; /* Driver-determined */
181 acpi_device_class device_class; /* " */ 185 acpi_device_class device_class; /* " */
182}; 186};
183 187
184#define acpi_device_bid(d) ((d)->pnp.bus_id) 188#define acpi_device_bid(d) ((d)->pnp.bus_id)
185#define acpi_device_adr(d) ((d)->pnp.bus_address) 189#define acpi_device_adr(d) ((d)->pnp.bus_address)
186#define acpi_device_hid(d) ((d)->pnp.hardware_id) 190char *acpi_device_hid(struct acpi_device *device);
187#define acpi_device_uid(d) ((d)->pnp.unique_id) 191#define acpi_device_uid(d) ((d)->pnp.unique_id)
188#define acpi_device_name(d) ((d)->pnp.device_name) 192#define acpi_device_name(d) ((d)->pnp.device_name)
189#define acpi_device_class(d) ((d)->pnp.device_class) 193#define acpi_device_class(d) ((d)->pnp.device_class)