summaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorIrina Tirdea <irina.tirdea@intel.com>2016-03-13 04:02:58 +0300
committerLee Jones <lee.jones@linaro.org>2016-04-11 15:31:40 +0300
commitee414de525a9abf29e8a1b0c1b6f79f9e875213a (patch)
treeeaaf0ac0265e516cf0a7b2a87808d2c33be81659 /drivers/mfd
parent9caac886397bdfd6c1a6b48493db6cd95bce313c (diff)
downloadlinux-ee414de525a9abf29e8a1b0c1b6f79f9e875213a.tar.xz
mfd: core: Fix ACPI child matching by _HID/_CID
If MDF child devices have separate ACPI nodes identified by _HID/_CID, they will not be assigned the intended ACPI companion. acpi_match_device_ids will return 0 if a the child device matches the _HID/_CID, so this patch changes the matching condition to check for 0 on success. Signed-off-by: Irina Tirdea <irina.tirdea@intel.com> Acked-by: Mika Westerberg <mika.westeberg@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/mfd-core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
index 88bd1b1e47be..409da01effcd 100644
--- a/drivers/mfd/mfd-core.c
+++ b/drivers/mfd/mfd-core.c
@@ -107,7 +107,7 @@ static void mfd_acpi_add_device(const struct mfd_cell *cell,
strlcpy(ids[0].id, match->pnpid, sizeof(ids[0].id));
list_for_each_entry(child, &parent->children, node) {
- if (acpi_match_device_ids(child, ids)) {
+ if (!acpi_match_device_ids(child, ids)) {
adev = child;
break;
}