From nobody Tue Oct 7 03:56:55 2025 Received: from mx1.secunet.com (mx1.secunet.com [62.96.220.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E57B26136D for ; Mon, 14 Jul 2025 15:27:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=62.96.220.36 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752506842; cv=none; b=rCCipdbRrUmMO1pvYPxdtyTCYHFuOXjz9Da/DTgHsDdgz+pm8K1GR9emAG6VsaQgq0nXi9YvrONEc+fr9AnBYOf6hovo4cJarTi24sw09DL6CoCf1/uuymhbA+BAl17yI+AncwkrfhEGD69+aIpg30lE3VSPmVfRYOslwQUmYt4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752506842; c=relaxed/simple; bh=VhISQusA4JxiQyLFqdYM75SPbIGJqEPE0o6W49XMvhU=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=STvYuWLvY5whJOFyKI8DE4UBIiGlH9p1s90H7h4KNi1Z933a2ZM/8GLslZbHjWmlU5FAqV3EiXw0IK6D2AfA3SthcDPTpug9q2RRmqqzrvvJ5Rfoa+xjQRDkv6RSoeiLYTTV6V1HRDmb9VubLed5f40goeVJzU3ljIB4NG/RgSU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=secunet.com; spf=pass smtp.mailfrom=secunet.com; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b=lDPI4d+b; arc=none smtp.client-ip=62.96.220.36 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=secunet.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=secunet.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=secunet.com header.i=@secunet.com header.b="lDPI4d+b" Received: from localhost (localhost [127.0.0.1]) by mx1.secunet.com (Postfix) with ESMTP id D7C532050A; Mon, 14 Jul 2025 17:27:16 +0200 (CEST) X-Virus-Scanned: by secunet Received: from mx1.secunet.com ([127.0.0.1]) by localhost (mx1.secunet.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z4sMKxBn-z8T; Mon, 14 Jul 2025 17:27:16 +0200 (CEST) Received: from EXCH-03.secunet.de (unknown [10.32.0.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.secunet.com (Postfix) with ESMTPS id 4BAB220189; Mon, 14 Jul 2025 17:27:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.secunet.com 4BAB220189 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=secunet.com; s=202301; t=1752506836; bh=VhISQusA4JxiQyLFqdYM75SPbIGJqEPE0o6W49XMvhU=; h=From:To:CC:Subject:Date:From; b=lDPI4d+bBnEQ1QXRAHNaqclaZkU6pg50UCIMOaOzcsIowpHpc0F+bVmpGAiniYU5/ mgzK9h7+eJhyTDH3Qc94sj6xne4QGVdUej1n3LzIP5vb1gW79SHzGNxL1BfZQ6LsRW dm56H0RC2iF90bsQ/1GTipw7MNaYRbqQbNPJJAe6qLZoRYT/yMrC5/o+nt1Wzubqup Gevy5RmVEwWbDfySZlOwoxwSVny2GdkuctQ/+GvOGVehJmPVQtnIbl/yD2VL8xshhO 8gvlD5915WnEXbDScNVseLb4NbJiHZTaLugNVbVdjzWO1T6nDgUJxQk+OzeVhpTw2k IUGzF6B2lM+3g== Received: from EXCH-04.secunet.de (10.32.0.184) by EXCH-03.secunet.de (10.32.0.183) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1748.10; Mon, 14 Jul 2025 17:27:15 +0200 Received: from EXCH-04.secunet.de ([fe80::f0d0:317:aa9d:ee57]) by EXCH-04.secunet.de ([fe80::f0d0:317:aa9d:ee57%4]) with mapi id 15.02.1748.010; Mon, 14 Jul 2025 17:27:06 +0200 From: "Heijligen, Thomas" To: "lee@kernel.org" , "linux-kernel@vger.kernel.org" CC: "Huber, Nico" , "michael.brunner@kontron.com" , "Schumann, Peter" Subject: [PATCH] mfd: kempld: Switch back to earlier ->init() behavior Thread-Topic: [PATCH] mfd: kempld: Switch back to earlier ->init() behavior Thread-Index: AQHb9NPB/wnq4hn0ZUu7P6EQBYYsOw== Date: Mon, 14 Jul 2025 15:27:06 +0000 Message-ID: <71883d70d1b99f58c96ba1b0016751f41519025b.camel@secunet.com> Accept-Language: en-US, de-DE Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: Content-Type: text/plain; charset="utf-8" Content-ID: <4E9EE9A97BCD764FA20E32CC4F4F7C21@secunet.com> Content-Transfer-Encoding: quoted-printable Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit 9e36775c22c7 ("mfd: kempld: Remove custom DMI matching code") removes the ability to load the driver if no matching system DMI data is found. Before this commit the driver could be loaded using alternative methods such as ACPI or `force_device_id` in the absence of a matching system DMI entry. Restore this ability while keeping the refactored `platform_device_info` table. Signed-off-by: Thomas Heijligen Reviewed-by: Andy Shevchenko --- drivers/mfd/kempld-core.c | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/drivers/mfd/kempld-core.c b/drivers/mfd/kempld-core.c index c5bfb6440a93..b0ddceae3864 100644 --- a/drivers/mfd/kempld-core.c +++ b/drivers/mfd/kempld-core.c @@ -779,22 +779,19 @@ MODULE_DEVICE_TABLE(dmi, kempld_dmi_table); static int __init kempld_init(void) { const struct dmi_system_id *id; - int ret =3D -ENODEV; =20 - for (id =3D dmi_first_match(kempld_dmi_table); id; id =3D dmi_first_match= (id + 1)) { - /* Check, if user asked for the exact device ID match */ - if (force_device_id[0] && !strstr(id->ident, force_device_id)) - continue; - - ret =3D kempld_create_platform_device(&kempld_platform_data_generic); - if (ret) - continue; - - break; + if (force_device_id[0]) { + for (id =3D kempld_dmi_table; id->matches[0].slot !=3D DMI_NONE; id++) + if (strstr(id->ident, force_device_id)) + if (!kempld_create_platform_device(&kempld_platform_data_generic)) + break; + if (id->matches[0].slot =3D=3D DMI_NONE) + return -ENODEV; + } else { + for (id =3D dmi_first_match(kempld_dmi_table); id; id =3D dmi_first_matc= h(id+1)) + if (kempld_create_platform_device(&kempld_platform_data_generic)) + break; } - if (ret) - return ret; - return platform_driver_register(&kempld_driver); } =20 --=20 2.49.0