]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform/x86/intel/hid: Stop creating a platform device
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 15 Dec 2025 13:35:05 +0000 (14:35 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Tue, 16 Dec 2025 20:51:04 +0000 (21:51 +0100)
Now that "system" devices are represented as platform devices, they
are not claimed by the PNP ACPI scan handler any more and the Intel
HID platform devices should be created by the ACPI core, so the
driver does not need to attempt to create a platform device by
itself.

Accordingly, make it stop doing so.

No intentional functional impact.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Link: https://patch.msgid.link/6115868.MhkbZ0Pkbq@rafael.j.wysocki
drivers/platform/x86/intel/hid.c

index 560cc063198e104d728371ce8d388abcea7c6bf1..0f8684f4464bbf53fb1578a2d132563ff51404ad 100644 (file)
@@ -779,43 +779,4 @@ static struct platform_driver intel_hid_pl_driver = {
        .remove = intel_hid_remove,
 };
 
-/*
- * Unfortunately, some laptops provide a _HID="INT33D5" device with
- * _CID="PNP0C02".  This causes the pnpacpi scan driver to claim the
- * ACPI node, so no platform device will be created.  The pnpacpi
- * driver rejects this device in subsequent processing, so no physical
- * node is created at all.
- *
- * As a workaround until the ACPI core figures out how to handle
- * this corner case, manually ask the ACPI platform device code to
- * claim the ACPI node.
- */
-static acpi_status __init
-check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
-{
-       const struct acpi_device_id *ids = context;
-       struct acpi_device *dev = acpi_fetch_acpi_dev(handle);
-
-       if (dev && acpi_match_device_ids(dev, ids) == 0)
-               if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
-                       dev_info(&dev->dev,
-                                "intel-hid: created platform device\n");
-
-       return AE_OK;
-}
-
-static int __init intel_hid_init(void)
-{
-       acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-                           ACPI_UINT32_MAX, check_acpi_dev, NULL,
-                           (void *)intel_hid_ids, NULL);
-
-       return platform_driver_register(&intel_hid_pl_driver);
-}
-module_init(intel_hid_init);
-
-static void __exit intel_hid_exit(void)
-{
-       platform_driver_unregister(&intel_hid_pl_driver);
-}
-module_exit(intel_hid_exit);
+module_platform_driver(intel_hid_pl_driver);