From: Woody Zhang Date: Sun, 30 Mar 2025 10:36:27 +0000 (+0800) Subject: platform: replace magic number with macro PLATFORM_DEVID_NONE X-Git-Tag: v6.16-rc1~126^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c016bc3063fa344f5cb74f06ec07d37136229ca;p=thirdparty%2Fkernel%2Flinux.git platform: replace magic number with macro PLATFORM_DEVID_NONE Replace magic number with PLATFORM_DEVID_NONE to make it more informative. Signed-off-by: Woody Zhang Link: https://lore.kernel.org/r/20250330103627.2370771-2-woodyzhang666@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 1813cfd0c4bdf..63dfa41f0904a 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -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;