]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
platform/surface: surfacepro3_button: Check ACPI_COMPANION()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 12 May 2026 16:30:26 +0000 (18:30 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 19 May 2026 13:51:07 +0000 (16:51 +0300)
commit5798b46271e229dab05e47537ac30b76f81728da
treeb52db5b293cdd587249c6724b7f006a8c2e4445c
parenta9f305c5a355efeb240d406d378491d9eec02d07
platform/surface: surfacepro3_button: Check ACPI_COMPANION()

Every platform driver can be forced to match a device that doesn't match
its list of device IDs because of device_match_driver_override(), so
platform drivers that rely on the existence of a device's ACPI companion
object need to verify its presence.

Accordingly, add a requisite ACPI_COMPANION() check against NULL to the
surfacepro3_button driver.

Fixes: d913a5a12b40 ("platform/surface: surfacepro3_button: Convert to a platform driver")
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Chen Yu <yu.c.chen@intel.com>
Link: https://patch.msgid.link/23119222.EfDdHjke4D@rafael.j.wysocki
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/surface/surfacepro3_button.c