Skip to content

Commit 61ddc92

Browse files
committed
platform/x86/intel/hid: Stop creating a platform device
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
1 parent 3ad5df2 commit 61ddc92

1 file changed

Lines changed: 1 addition & 40 deletions

File tree

  • drivers/platform/x86/intel

drivers/platform/x86/intel/hid.c

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -779,43 +779,4 @@ static struct platform_driver intel_hid_pl_driver = {
779779
.remove = intel_hid_remove,
780780
};
781781

782-
/*
783-
* Unfortunately, some laptops provide a _HID="INT33D5" device with
784-
* _CID="PNP0C02". This causes the pnpacpi scan driver to claim the
785-
* ACPI node, so no platform device will be created. The pnpacpi
786-
* driver rejects this device in subsequent processing, so no physical
787-
* node is created at all.
788-
*
789-
* As a workaround until the ACPI core figures out how to handle
790-
* this corner case, manually ask the ACPI platform device code to
791-
* claim the ACPI node.
792-
*/
793-
static acpi_status __init
794-
check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
795-
{
796-
const struct acpi_device_id *ids = context;
797-
struct acpi_device *dev = acpi_fetch_acpi_dev(handle);
798-
799-
if (dev && acpi_match_device_ids(dev, ids) == 0)
800-
if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
801-
dev_info(&dev->dev,
802-
"intel-hid: created platform device\n");
803-
804-
return AE_OK;
805-
}
806-
807-
static int __init intel_hid_init(void)
808-
{
809-
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
810-
ACPI_UINT32_MAX, check_acpi_dev, NULL,
811-
(void *)intel_hid_ids, NULL);
812-
813-
return platform_driver_register(&intel_hid_pl_driver);
814-
}
815-
module_init(intel_hid_init);
816-
817-
static void __exit intel_hid_exit(void)
818-
{
819-
platform_driver_unregister(&intel_hid_pl_driver);
820-
}
821-
module_exit(intel_hid_exit);
782+
module_platform_driver(intel_hid_pl_driver);

0 commit comments

Comments
 (0)