diff options
author | Mika Westerberg <mika.westerberg@linux.intel.com> | 2014-10-21 13:33:56 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-11-04 21:58:21 +0100 |
commit | 733e625139fe455b4d910ac63c18c90f7cbe2d6f (patch) | |
tree | 0c67448b04c118138a66f485094fe951dfe24e84 /include/linux/acpi.h | |
parent | b31384fa5de37a100507751dfb5c0a49d06cee67 (diff) | |
download | talos-obmc-linux-733e625139fe455b4d910ac63c18c90f7cbe2d6f.tar.gz talos-obmc-linux-733e625139fe455b4d910ac63c18c90f7cbe2d6f.zip |
ACPI: Allow drivers to match using Device Tree compatible property
We have lots of existing Device Tree enabled drivers and allocating
separate _HID for each is not feasible. Instead we allocate special _HID
"PRP0001" that means that the match should be done using Device Tree
compatible property using driver's .of_match_table instead if the driver
is missing .acpi_match_table.
If there is a need to distinguish from where the device is enumerated
(DT/ACPI) driver can check dev->of_node or ACPI_COMPATION(dev).
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Grant Likely <grant.likely@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/acpi.h')
-rw-r--r-- | include/linux/acpi.h | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 76d64d6a903a..38296d686c55 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -424,12 +424,8 @@ extern int acpi_nvs_for_each_region(int (*func)(__u64, __u64, void *), const struct acpi_device_id *acpi_match_device(const struct acpi_device_id *ids, const struct device *dev); -static inline bool acpi_driver_match_device(struct device *dev, - const struct device_driver *drv) -{ - return !!acpi_match_device(drv->acpi_match_table, dev); -} - +extern bool acpi_driver_match_device(struct device *dev, + const struct device_driver *drv); int acpi_device_uevent_modalias(struct device *, struct kobj_uevent_env *); int acpi_device_modalias(struct device *, char *, int); |