]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
sonypi: Convert ACPI driver to a platform one
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 23 Feb 2026 15:59:14 +0000 (16:59 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 15:06:18 +0000 (17:06 +0200)
commit7e488b0af0216f40159cc19d5db1b614c80f5134
tree538ac255583079c77e073fe948f29c1a3a8c27fd
parent2d7ce8eb59ec880774c7500ac949f0100acba521
sonypi: 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 sonypi 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: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://patch.msgid.link/2277493.Mh6RI2rZIc@rafael.j.wysocki
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/sonypi.c