浏览代码

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>
Irina Tirdea 9 年之前
父节点
当前提交
ee414de525
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/mfd/mfd-core.c

+ 1 - 1
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));
 			strlcpy(ids[0].id, match->pnpid, sizeof(ids[0].id));
 			list_for_each_entry(child, &parent->children, node) {
 			list_for_each_entry(child, &parent->children, node) {
-				if (acpi_match_device_ids(child, ids)) {
+				if (!acpi_match_device_ids(child, ids)) {
 					adev = child;
 					adev = child;
 					break;
 					break;
 				}
 				}