diff options
author | Kurt Borja <kuurtb@gmail.com> | 2025-02-14 19:03:01 -0500 |
---|---|---|
committer | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2025-02-24 13:49:18 +0200 |
commit | 38b9ab80db31cf993a8f3ab2baf772083b62ca6f (patch) | |
tree | f7c56982a5cd9d0dce0454d1941e87c4a25158a3 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | c5855d2022b0d33702d5da24ed8caa80a3e57c23 (diff) |
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>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions