Skip to contentSkip to conversation

gpio: swnode: restore the name of the undefined software node

PATCH Applied Bartosz Golaszewski 2 participants 3 messages Jan 2 – Jan 5 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpio/gpiolib-swnode.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpio/gpiolib-swnode.c +3 -1
index 54bad9e88fe5..21478b45c127 100644
@@ -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)
Signature · 1 line
2.47.3
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Bartosz Golaszewski

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.

Signature · 2 lines
With Best Regards,
Andy Shevchenko
author Applied
#2 lore raw
In reply to Bartosz Golaszewski
Quoted 8 lines · Bartosz Golaszewski

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.

[...]

Applied, thanks!

[1/1] gpio: swnode: restore the name of the undefined software node

      commit: 98d78c06f54da101c1f2eb79af378cee9e07e102

Best regards,

Signature · 1 line
Bartosz Golaszewski <[email protected]>