]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
tpm_crb: Convert ACPI driver to a platform one
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Feb 2026 15:55:21 +0000 (16:55 +0100)
committerJarkko Sakkinen <jarkko@kernel.org>
Tue, 21 Apr 2026 15:54:27 +0000 (18:54 +0300)
commit48fe2cddc85c7849463bd01ae8b8c6b575ff508b
treedf37f50bd5b5c7b66d43519785530f354614801e
parente6ffe09488e2010a04eb11e884cfee630e8c56a6
tpm_crb: Convert ACPI driver to a platform one

In all cases in which a struct acpi_driver is used for binding a driver
to an ACPI device object, a corresponding platform device is created by
the ACPI core and that device is regarded as a proper representation of
underlying hardware.  Accordingly, a struct platform_driver should be
used by driver code to bind to that device.  There are multiple reasons
why drivers should not bind directly to ACPI device objects [1].

Overall, it is better to bind drivers to platform devices than to their
ACPI companions, so convert the tpm_crb ACPI driver to a platform one.

While this is not expected to alter functionality, it changes sysfs
layout and so it will be visible to user space.

Link: https://lore.kernel.org/all/2396510.ElGaqSPkdT@rafael.j.wysocki/
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/tpm_crb.c