summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-01-29 15:45:33 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2022-01-29 15:45:33 +0200
commit4cd90083d32574e52ac839c6c7e4ff445ac4472c (patch)
treec8d68883461bce5f03828e148a679b2425eb2e15
parente255759e5afbc233544d7246ad325417320e90b6 (diff)
parent8aa0f94b0a8d5304ea1bd63bf1ed06f9e395e328 (diff)
downloadlwn-4cd90083d32574e52ac839c6c7e4ff445ac4472c.tar.gz
lwn-4cd90083d32574e52ac839c6c7e4ff445ac4472c.zip
Merge tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio fixes from Bartosz Golaszewski: "Two fixes for the gpio-simulator: - fix a bug with hogs not being set-up in gpio-sim when user-space sets the chip label to an empty string - include the gpio-sim documentation in the index" * tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: gpio: sim: add doc file to index file gpio: sim: check the label length when setting up device properties
-rw-r--r--Documentation/admin-guide/gpio/index.rst1
-rw-r--r--drivers/gpio/gpio-sim.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/admin-guide/gpio/index.rst b/Documentation/admin-guide/gpio/index.rst
index 7db367572f30..f6861ca16ffe 100644
--- a/Documentation/admin-guide/gpio/index.rst
+++ b/Documentation/admin-guide/gpio/index.rst
@@ -10,6 +10,7 @@ gpio
gpio-aggregator
sysfs
gpio-mockup
+ gpio-sim
.. only:: subproject and html
diff --git a/drivers/gpio/gpio-sim.c b/drivers/gpio/gpio-sim.c
index 838bbfed11d3..04b137eca8da 100644
--- a/drivers/gpio/gpio-sim.c
+++ b/drivers/gpio/gpio-sim.c
@@ -816,7 +816,7 @@ gpio_sim_make_bank_swnode(struct gpio_sim_bank *bank,
properties[prop_idx++] = PROPERTY_ENTRY_U32("ngpios", bank->num_lines);
- if (bank->label)
+ if (bank->label && (strlen(bank->label) > 0))
properties[prop_idx++] = PROPERTY_ENTRY_STRING("gpio-sim,label",
bank->label);