lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20240414065049.28981-1-marco@sirabella.org>
Date: Sun, 14 Apr 2024 02:50:49 -0400
From: Marco Sirabella <marco@...abella.org>
To: linux-kernel@...r.kernel.org
Cc: Linus Walleij <linus.walleij@...aro.org>,
	Jonathan Corbet <corbet@....net>,
	linux-gpio@...r.kernel.org,
	linux-doc@...r.kernel.org,
	Marco Sirabella <marco@...abella.org>
Subject: [PATCH] Documentation: Add additional missing arg to dev_gpiod_get examples

in 39b2bbe3d715 (gpio: add flags argument to gpiod_get*() functions) a
third argument was added to the function, apply that to examples found
in the tree with a simple regex: gpiod_get\([^(,]*,[^(,]*\)

Signed-off-by: Marco Sirabella <marco@...abella.org>
---
 Documentation/driver-api/pin-control.rst          | 2 +-
 Documentation/firmware-guide/acpi/enumeration.rst | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Documentation/driver-api/pin-control.rst b/Documentation/driver-api/pin-control.rst
index 4639912dc9cc..bdb0a17d092b 100644
--- a/Documentation/driver-api/pin-control.rst
+++ b/Documentation/driver-api/pin-control.rst
@@ -1293,7 +1293,7 @@ So say that your driver is fetching its resources like this:
 	struct gpio_desc *gpio;
 
 	pinctrl = devm_pinctrl_get_select_default(&dev);
-	gpio = devm_gpiod_get(&dev, "foo");
+	gpio = devm_gpiod_get(&dev, "foo", GPIOD_ASIS);
 
 Here we first request a certain pin state and then request GPIO "foo" to be
 used. If you're using the subsystems orthogonally like this, you should
diff --git a/Documentation/firmware-guide/acpi/enumeration.rst b/Documentation/firmware-guide/acpi/enumeration.rst
index 0165b09c0957..f9dcf15f7346 100644
--- a/Documentation/firmware-guide/acpi/enumeration.rst
+++ b/Documentation/firmware-guide/acpi/enumeration.rst
@@ -416,11 +416,11 @@ a code like this::
 
 	struct gpio_desc *irq_desc, *power_desc;
 
-	irq_desc = gpiod_get(dev, "irq");
+	irq_desc = gpiod_get(dev, "irq", GPIOD_IN);
 	if (IS_ERR(irq_desc))
 		/* handle error */
 
-	power_desc = gpiod_get(dev, "power");
+	power_desc = gpiod_get(dev, "power", GPIOD_IN);
 	if (IS_ERR(power_desc))
 		/* handle error */
 
-- 
2.43.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ