diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index c07fdb94d665..83b8b5ac49c9 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -153,6 +153,7 @@ static int __init pnpacpi_add_device(struct acpi_device *device) | |||
153 | acpi_handle temp = NULL; | 153 | acpi_handle temp = NULL; |
154 | acpi_status status; | 154 | acpi_status status; |
155 | struct pnp_dev *dev; | 155 | struct pnp_dev *dev; |
156 | struct acpi_hardware_id *id; | ||
156 | 157 | ||
157 | /* | 158 | /* |
158 | * If a PnPacpi device is not present , the device | 159 | * If a PnPacpi device is not present , the device |
@@ -193,15 +194,12 @@ static int __init pnpacpi_add_device(struct acpi_device *device) | |||
193 | if (dev->capabilities & PNP_CONFIGURABLE) | 194 | if (dev->capabilities & PNP_CONFIGURABLE) |
194 | pnpacpi_parse_resource_option_data(dev); | 195 | pnpacpi_parse_resource_option_data(dev); |
195 | 196 | ||
196 | if (device->flags.compatible_ids) { | 197 | list_for_each_entry(id, &device->pnp.ids, list) { |
197 | struct acpica_device_id_list *cid_list = device->pnp.cid_list; | 198 | if (!strcmp(id->id, acpi_device_hid(device))) |
198 | int i; | 199 | continue; |
199 | 200 | if (!ispnpidacpi(id->id)) | |
200 | for (i = 0; i < cid_list->count; i++) { | 201 | continue; |
201 | if (!ispnpidacpi(cid_list->ids[i].string)) | 202 | pnp_add_id(dev, id->id); |
202 | continue; | ||
203 | pnp_add_id(dev, cid_list->ids[i].string); | ||
204 | } | ||
205 | } | 203 | } |
206 | 204 | ||
207 | /* clear out the damaged flags */ | 205 | /* clear out the damaged flags */ |
@@ -232,9 +230,8 @@ static int __init acpi_pnp_match(struct device *dev, void *_pnp) | |||
232 | struct pnp_dev *pnp = _pnp; | 230 | struct pnp_dev *pnp = _pnp; |
233 | 231 | ||
234 | /* true means it matched */ | 232 | /* true means it matched */ |
235 | return acpi->flags.hardware_id | 233 | return !acpi_get_physical_device(acpi->handle) |
236 | && !acpi_get_physical_device(acpi->handle) | 234 | && compare_pnp_id(pnp->id, acpi_device_hid(acpi)); |
237 | && compare_pnp_id(pnp->id, acpi->pnp.hardware_id); | ||
238 | } | 235 | } |
239 | 236 | ||
240 | static int __init acpi_pnp_find_device(struct device *dev, acpi_handle * handle) | 237 | static int __init acpi_pnp_find_device(struct device *dev, acpi_handle * handle) |