diff options
author | Barnabás Pőcze <pobrn@protonmail.com> | 2022-09-30 13:59:14 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2022-10-03 10:40:04 +0300 |
commit | 8d05fc039456517d2c246c7b202891188ba40c4d (patch) | |
tree | b9655715ea55679b961f5805ee3d0e4527d08556 /drivers/platform/x86/dell | |
parent | c928df03bde92d70babeb22d500f528256758aee (diff) | |
download | linux-8d05fc039456517d2c246c7b202891188ba40c4d.tar.xz |
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: Barnabás Pőcze <pobrn@protonmail.com>
Link: https://lore.kernel.org/r/20220930104857.2796923-1-pobrn@protonmail.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/dell')
-rw-r--r-- | drivers/platform/x86/dell/alienware-wmi.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/dell/dcdbas.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/dell/dell-laptop.c | 2 | ||||
-rw-r--r-- | drivers/platform/x86/dell/dell_rbu.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/platform/x86/dell/alienware-wmi.c b/drivers/platform/x86/dell/alienware-wmi.c index f21248255529..a34e07ef2c79 100644 --- a/drivers/platform/x86/dell/alienware-wmi.c +++ b/drivers/platform/x86/dell/alienware-wmi.c @@ -791,7 +791,7 @@ static int __init alienware_wmi_init(void) ret = platform_driver_register(&platform_driver); if (ret) goto fail_platform_driver; - platform_device = platform_device_alloc("alienware-wmi", -1); + platform_device = platform_device_alloc("alienware-wmi", PLATFORM_DEVID_NONE); if (!platform_device) { ret = -ENOMEM; goto fail_platform_device1; diff --git a/drivers/platform/x86/dell/dcdbas.c b/drivers/platform/x86/dell/dcdbas.c index 42beafbc54b2..0ecb7b164750 100644 --- a/drivers/platform/x86/dell/dcdbas.c +++ b/drivers/platform/x86/dell/dcdbas.c @@ -716,7 +716,7 @@ static struct platform_driver dcdbas_driver = { static const struct platform_device_info dcdbas_dev_info __initconst = { .name = DRIVER_NAME, - .id = -1, + .id = PLATFORM_DEVID_NONE, .dma_mask = DMA_BIT_MASK(32), }; diff --git a/drivers/platform/x86/dell/dell-laptop.c b/drivers/platform/x86/dell/dell-laptop.c index 1321687d923e..e92c3ad06d69 100644 --- a/drivers/platform/x86/dell/dell-laptop.c +++ b/drivers/platform/x86/dell/dell-laptop.c @@ -2193,7 +2193,7 @@ static int __init dell_init(void) ret = platform_driver_register(&platform_driver); if (ret) goto fail_platform_driver; - platform_device = platform_device_alloc("dell-laptop", -1); + platform_device = platform_device_alloc("dell-laptop", PLATFORM_DEVID_NONE); if (!platform_device) { ret = -ENOMEM; goto fail_platform_device1; diff --git a/drivers/platform/x86/dell/dell_rbu.c b/drivers/platform/x86/dell/dell_rbu.c index e9f4b30dcafa..9f51e0fcab04 100644 --- a/drivers/platform/x86/dell/dell_rbu.c +++ b/drivers/platform/x86/dell/dell_rbu.c @@ -645,7 +645,7 @@ static int __init dcdrbu_init(void) spin_lock_init(&rbu_data.lock); init_packet_head(); - rbu_device = platform_device_register_simple("dell_rbu", -1, NULL, 0); + rbu_device = platform_device_register_simple("dell_rbu", PLATFORM_DEVID_NONE, NULL, 0); if (IS_ERR(rbu_device)) { pr_err("platform_device_register_simple failed\n"); return PTR_ERR(rbu_device); |