Skip to content

Commit

Permalink
Merge tag 'gpio-fixes-for-v5.17-rc2' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed Jan 29, 2022
2 parents e255759 + 8aa0f94 commit 4cd9008
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Documentation/admin-guide/gpio/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ gpio
gpio-aggregator
sysfs
gpio-mockup
gpio-sim

.. only:: subproject and html

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-sim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 4cd9008

Please sign in to comment.