From: Lee Jones <lee@kernel.org>
To: "Heijligen, Thomas" <thomas.heijligen@secunet.com>,
andriy.shevchenko@linux.intel.com
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Huber, Nico" <Nico.Huber@secunet.com>,
"michael.brunner@kontron.com" <michael.brunner@kontron.com>,
"Schumann, Peter" <Peter.Schumann@secunet.com>
Subject: Re: [PATCH] mfd: kempld: Switch back to earlier ->init() behavior
Date: Wed, 23 Jul 2025 10:56:47 +0100 [thread overview]
Message-ID: <20250723095647.GS11056@google.com> (raw)
In-Reply-To: <71883d70d1b99f58c96ba1b0016751f41519025b.camel@secunet.com>
> 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.
You need to Cc the author of this change to give them a say.
> Restore this ability while keeping the refactored
> `platform_device_info` table.
>
> Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
> ---
> 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 = -ENODEV;
>
> - for (id = dmi_first_match(kempld_dmi_table); id; id = 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 = kempld_create_platform_device(&kempld_platform_data_generic);
> - if (ret)
> - continue;
> -
> - break;
> + if (force_device_id[0]) {
> + for (id = kempld_dmi_table; id->matches[0].slot != 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 == DMI_NONE)
> + return -ENODEV;
> + } else {
> + for (id = dmi_first_match(kempld_dmi_table); id; id = dmi_first_match(id+1))
> + if (kempld_create_platform_device(&kempld_platform_data_generic))
> + break;
> }
> - if (ret)
> - return ret;
> -
> return platform_driver_register(&kempld_driver);
> }
>
> --
> 2.49.0
>
--
Lee Jones [李琼斯]
next prev parent reply other threads:[~2025-07-23 9:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-14 15:27 Heijligen, Thomas
2025-07-23 9:56 ` Lee Jones [this message]
2025-07-23 15:04 ` Andy Shevchenko
2025-07-31 14:42 ` Heijligen, Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250723095647.GS11056@google.com \
--to=lee@kernel.org \
--cc=Nico.Huber@secunet.com \
--cc=Peter.Schumann@secunet.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=michael.brunner@kontron.com \
--cc=thomas.heijligen@secunet.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®