From: Kurt Borja <kuurtb@gmail.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
"Mark Pearson" <mpearson-lenovo@squebb.ca>
Cc: "Hans de Goede" <hdegoede@redhat.com>,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
ibm-acpi-devel@lists.sourceforge.net,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, Kurt Borja <kuurtb@gmail.com>
Subject: [PATCH 0/2] platform/x86: thinkpad_acpi: Enable devres for subdriver .init callbacks
Date: Fri, 14 Feb 2025 19:03:00 -0500 [thread overview]
Message-ID: <20250215000302.19753-1-kuurtb@gmail.com> (raw)
Hi all,
It was reported by Mark [1] that if subdrivers used devres, the
tpacpi_pdev wouldn't bind successfully to the device, thus failing to
create the various sysfs attributes that this driver exposes.
The original problem is already fixed, however a complete solution was
due.
The approach I took is to let the driver core manage the lifetimes of
the subdrivers (details in Patch [1/2]). This enables devres for
subdrivers and IMO makes the code more maintainable (because of the
lifetime gurantees).
This was compile tested only, because (unfortunately) I don't own a
thinkpad so some testing is absolutely required, as this is an extremely
intricate driver.
Based on top of the for-next branch.
~ Kurt
---
[1] https://lore.kernel.org/platform-driver-x86/20250208091438.5972-1-mpearson-lenovo@squebb.ca/#t
Kurt Borja (2):
platform/x86: thinkpad_acpi: Move subdriver initialization to
tpacpi_pdriver's probe.
platform/x86: thinkpad_acpi: Move HWMON initialization to
tpacpi_hwmon_pdriver's probe
drivers/platform/x86/thinkpad_acpi.c | 176 ++++++++++++---------------
1 file changed, 77 insertions(+), 99 deletions(-)
base-commit: d497c47481f8e8f13e3191c9a707ed942d3bb3d7
--
2.48.1
next reply other threads:[~2025-02-15 0:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-15 0:03 Kurt Borja [this message]
2025-02-15 0:03 ` [PATCH 1/2] platform/x86: thinkpad_acpi: Move subdriver initialization to tpacpi_pdriver's probe Kurt Borja
2025-02-15 0:03 ` [PATCH 2/2] platform/x86: thinkpad_acpi: Move HWMON initialization to tpacpi_hwmon_pdriver's probe Kurt Borja
2025-02-18 16:50 ` Mark Pearson
2025-02-18 18:39 ` Kurt Borja
2025-02-24 15:17 ` [PATCH 0/2] platform/x86: thinkpad_acpi: Enable devres for subdriver .init callbacks Ilpo Järvinen
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=20250215000302.19753-1-kuurtb@gmail.com \
--to=kuurtb@gmail.com \
--cc=hdegoede@redhat.com \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpearson-lenovo@squebb.ca \
--cc=platform-driver-x86@vger.kernel.org \
/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®