From: Bartosz Golaszewski Date: Fri, 2 Jan 2026 09:33:49 +0000 (+0100) Subject: gpio: swnode: restore the name of the undefined software node X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98d78c06f54da101c1f2eb79af378cee9e07e102;p=thirdparty%2Fkernel%2Flinux.git gpio: swnode: restore the name of the undefined software node Commit 6774a66d0e10 ("gpio: swnode: compare the "undefined" swnode by its address, not name") switched to comparing the software nodes by address instead of names but it's still useful to keep the name of the node to expose the relevant information over sysfs. Restore the human-readable name. Suggested-by: Andy Shevchenko Closes: https://lore.kernel.org/all/aVFsjSIwrBw7tFLU@smile.fi.intel.com/ Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20260102093349.17822-1-bartosz.golaszewski@oss.qualcomm.com Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpiolib-swnode.c b/drivers/gpio/gpiolib-swnode.c index 54bad9e88fe5c..21478b45c127d 100644 --- a/drivers/gpio/gpiolib-swnode.c +++ b/drivers/gpio/gpiolib-swnode.c @@ -138,7 +138,9 @@ int swnode_gpio_count(const struct fwnode_handle *fwnode, const char *con_id) * A special node that identifies undefined GPIOs, this is primarily used as * a key for internal chip selects in SPI bindings. */ -const struct software_node swnode_gpio_undefined = { }; +const struct software_node swnode_gpio_undefined = { + .name = "swnode-gpio-undefined", +}; EXPORT_SYMBOL_NS_GPL(swnode_gpio_undefined, "GPIO_SWNODE"); static int __init swnode_gpio_init(void)