Commit 8d05fc03 authored by Barnabás Pőcze's avatar Barnabás Pőcze Committed by Hans de Goede
Browse files

platform/x86: use PLATFORM_DEVID_NONE instead of -1



Use the `PLATFORM_DEVID_NONE` constant instead of
hard-coding -1 when creating a platform device.

No functional changes are intended.

Signed-off-by: default avatarBarnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20220930104857.2796923-1-pobrn@protonmail.com


Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent c928df03
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2463,7 +2463,7 @@ static int __init acer_wmi_init(void)
		goto error_platform_register;
	}

	acer_platform_device = platform_device_alloc("acer-wmi", -1);
	acer_platform_device = platform_device_alloc("acer-wmi", PLATFORM_DEVID_NONE);
	if (!acer_platform_device) {
		err = -ENOMEM;
		goto error_device_alloc;
+1 −1
Original line number Diff line number Diff line
@@ -676,7 +676,7 @@ static int __init acerhdf_register_platform(void)
	if (err)
		return err;

	acerhdf_dev = platform_device_alloc("acerhdf", -1);
	acerhdf_dev = platform_device_alloc("acerhdf", PLATFORM_DEVID_NONE);
	if (!acerhdf_dev) {
		err = -ENOMEM;
		goto err_device_alloc;
+1 −1
Original line number Diff line number Diff line
@@ -392,7 +392,7 @@ static int __init hsmp_plt_init(void)
	if (ret)
		return ret;

	amd_hsmp_platdev = platform_device_alloc(DRIVER_NAME, -1);
	amd_hsmp_platdev = platform_device_alloc(DRIVER_NAME, PLATFORM_DEVID_NONE);
	if (!amd_hsmp_platdev) {
		ret = -ENOMEM;
		goto drv_unregister;
+2 −1
Original line number Diff line number Diff line
@@ -150,7 +150,8 @@ static int __init amilo_rfkill_init(void)
	if (rc)
		return rc;

	amilo_rfkill_pdev = platform_device_register_simple(KBUILD_MODNAME, -1,
	amilo_rfkill_pdev = platform_device_register_simple(KBUILD_MODNAME,
							    PLATFORM_DEVID_NONE,
							    NULL, 0);
	if (IS_ERR(amilo_rfkill_pdev)) {
		rc = PTR_ERR(amilo_rfkill_pdev);
+1 −1
Original line number Diff line number Diff line
@@ -1633,7 +1633,7 @@ static int asus_platform_init(struct asus_laptop *asus)
{
	int result;

	asus->platform_device = platform_device_alloc(ASUS_LAPTOP_FILE, -1);
	asus->platform_device = platform_device_alloc(ASUS_LAPTOP_FILE, PLATFORM_DEVID_NONE);
	if (!asus->platform_device)
		return -ENOMEM;
	platform_set_drvdata(asus->platform_device, asus);
Loading