]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
platform: replace magic number with macro PLATFORM_DEVID_NONE
authorWoody Zhang <woodyzhang666@gmail.com>
Sun, 30 Mar 2025 10:36:27 +0000 (18:36 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 15 Apr 2025 16:06:08 +0000 (18:06 +0200)
Replace magic number with PLATFORM_DEVID_NONE to make it more
informative.

Signed-off-by: Woody Zhang <woodyzhang666@gmail.com>
Link: https://lore.kernel.org/r/20250330103627.2370771-2-woodyzhang666@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/platform.c

index 1813cfd0c4bdf4153662e650d8aaa32de69fcf76..63dfa41f0904aeb2aa60fa213516a9922b568e84 100644 (file)
@@ -982,7 +982,7 @@ struct platform_device * __init_or_module __platform_create_bundle(
        struct platform_device *pdev;
        int error;
 
-       pdev = platform_device_alloc(driver->driver.name, -1);
+       pdev = platform_device_alloc(driver->driver.name, PLATFORM_DEVID_NONE);
        if (!pdev) {
                error = -ENOMEM;
                goto err_out;