Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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 <andriy.shevchenko@linux.intel.com>
Closes: https://lore.kernel.org/all/aVFsjSIwrBw7tFLU@smile.fi.intel.com/
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20260102093349.17822-1-bartosz.golaszewski@oss.qualcomm.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

+3 -1
+3 -1
drivers/gpio/gpiolib-swnode.c
··· 138 138 * A special node that identifies undefined GPIOs, this is primarily used as 139 139 * a key for internal chip selects in SPI bindings. 140 140 */ 141 - const struct software_node swnode_gpio_undefined = { }; 141 + const struct software_node swnode_gpio_undefined = { 142 + .name = "swnode-gpio-undefined", 143 + }; 142 144 EXPORT_SYMBOL_NS_GPL(swnode_gpio_undefined, "GPIO_SWNODE"); 143 145 144 146 static int __init swnode_gpio_init(void)