Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753890AbcCMBDY (ORCPT ); Sat, 12 Mar 2016 20:03:24 -0500 Received: from mga03.intel.com ([134.134.136.65]:9373 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753694AbcCMBDM (ORCPT ); Sat, 12 Mar 2016 20:03:12 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,328,1455004800"; d="scan'208";a="935701983" From: Irina Tirdea To: Lee Jones , linux-kernel@vger.kernel.org Cc: Mika Westerberg , Andy Shevchenko , "Rafael J. Wysocki" , Octavian Purdila , Irina Tirdea Subject: [PATCH 1/1] mfd: core: fix ACPI child matching by _HID/_CID Date: Sun, 13 Mar 2016 03:02:58 +0200 Message-Id: <1457830978-17494-1-git-send-email-irina.tirdea@intel.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 907 Lines: 28 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 --- drivers/mfd/mfd-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c index 88bd1b1..409da01 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; } -- 1.9.1