Thread (87 messages) 87 messages, 9 authors, 2024-01-24

Re: [PATCH 03/21] gpiolib: provide gpio_device_find_by_label()

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-09-06 14:13:34
Also in: linux-acpi, linux-gpio, linux-omap, linux-tegra, lkml, platform-driver-x86

On Tue, Sep 05, 2023 at 08:52:51PM +0200, Bartosz Golaszewski wrote:
From: Bartosz Golaszewski <redacted>

By far the most common way of looking up GPIO devices is using their
label. Provide a helpers for that to avoid every user implementing their
own matching function.
...
+/**
+ * gpio_device_find_by_label() - wrapper around gpio_device_find() finding the
+ *                               GPIO device by its backing chip's label
+ * @label: Label to lookup
+ *
+ * Returns:
+ * Reference to the GPIO device or NULL. Reference must be released with
+ * ``gpio_device_put``.
Out of a sudden different format to refer the function.
Should be gpio_device_put(), so kernel-doc makes a hyperlink.
+ */
So, please, render all your kernel docs and look at the end result.

...
+	return gpio_device_find((void *)label, gpio_chip_match_by_label);
This casting is a bit awkward... But I have no good proposal for a change.

-- 
With Best Regards,
Andy Shevchenko



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help