ACPI: platform: Use PLATFORM_DEVID_NONE in acpi_create_platform_device()
authorJohn Garry <john.garry@huawei.com>
Thu, 1 Sep 2022 10:04:11 +0000 (18:04 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sat, 3 Sep 2022 18:55:25 +0000 (20:55 +0200)
Instead of hardcoding the value for the id, use PLATFORM_DEVID_NONE.

Signed-off-by: John Garry <john.garry@huawei.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_platform.c

index 176cc6e..ebd18c7 100644 (file)
@@ -138,7 +138,7 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
        pdevinfo.parent = adev->parent ?
                acpi_get_first_physical_node(adev->parent) : NULL;
        pdevinfo.name = dev_name(&adev->dev);
-       pdevinfo.id = -1;
+       pdevinfo.id = PLATFORM_DEVID_NONE;
        pdevinfo.res = resources;
        pdevinfo.num_res = count;
        pdevinfo.fwnode = acpi_fwnode_handle(adev);