Skip to content

Commit 686e905

Browse files
committed
platform/x86/intel/vbtn: 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 virtual button array 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/8661724.NyiUUSuA9g@rafael.j.wysocki
1 parent 61ddc92 commit 686e905

1 file changed

Lines changed: 1 addition & 29 deletions

File tree

  • drivers/platform/x86/intel

drivers/platform/x86/intel/vbtn.c

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -390,32 +390,4 @@ static struct platform_driver intel_vbtn_pl_driver = {
390390
.remove = intel_vbtn_remove,
391391
};
392392

393-
static acpi_status __init
394-
check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
395-
{
396-
const struct acpi_device_id *ids = context;
397-
struct acpi_device *dev = acpi_fetch_acpi_dev(handle);
398-
399-
if (dev && acpi_match_device_ids(dev, ids) == 0)
400-
if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
401-
dev_info(&dev->dev,
402-
"intel-vbtn: created platform device\n");
403-
404-
return AE_OK;
405-
}
406-
407-
static int __init intel_vbtn_init(void)
408-
{
409-
acpi_walk_namespace(ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
410-
ACPI_UINT32_MAX, check_acpi_dev, NULL,
411-
(void *)intel_vbtn_ids, NULL);
412-
413-
return platform_driver_register(&intel_vbtn_pl_driver);
414-
}
415-
module_init(intel_vbtn_init);
416-
417-
static void __exit intel_vbtn_exit(void)
418-
{
419-
platform_driver_unregister(&intel_vbtn_pl_driver);
420-
}
421-
module_exit(intel_vbtn_exit);
393+
module_platform_driver(intel_vbtn_pl_driver);

0 commit comments

Comments
 (0)