-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
platform/x86: thinkpad_acpi: Move subdriver initialization to tpacpi_…
…pdriver's probe. It was reported that if subdrivers assigned devres resources inside ibm_init_struct's .init callbacks, driver binding would fail with the following error message: platform thinkpad_acpi: Resources present before probing Let the driver core manage the lifetimes of the subdrivers and children devices, by initializing them inside tpacpi_driver's .probe callback. This is appropriate because these subdrivers usually expose sysfs groups and the driver core manages this automatically to avoid races. One immediate benefit of this, is that we are now able to use devres inside .init subdriver callbacks. platform_create_bundle is specifically used because it makes the driver's probe type synchronous and returns an ERR_PTR if attachment failed. Additionally, to make error handling simpler, allocate the input device using devm_input_allocate_device(). Reported-by: Mark Pearson <mpearson-lenovo@squebb.ca> Closes: https://lore.kernel.org/platform-driver-x86/20250208091438.5972-1-mpearson-lenovo@squebb.ca/#t Reviewed-by: Mark Pearson <mpearson-lenovo@squebb.ca> Tested-by: Mark Pearson <mpearson-lenovo@squebb.ca> Signed-off-by: Kurt Borja <kuurtb@gmail.com> Link: https://lore.kernel.org/r/20250215000302.19753-2-kuurtb@gmail.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
- Loading branch information
Kurt Borja
authored and
Ilpo Järvinen
committed
Feb 24, 2025
1 parent
c5855d2
commit 38b9ab8
Showing
1 changed file
with
62 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters