Thread (62 messages) 62 messages, 5 authors, 2024-02-22

Re: [PATCH 05/23] gpio: nomadik: extract GPIO platform driver from drivers/pinctrl/nomadik/

From: Bartosz Golaszewski <hidden>
Date: 2024-02-19 15:34:07
Also in: linux-arm-kernel, linux-gpio, linux-mips, lkml

On Thu, Feb 15, 2024 at 11:03 AM Philipp Zabel [off-list ref] wrote:
On Mi, 2024-02-14 at 17:23 +0100, Théo Lebrun wrote:
[...]
quoted
diff --git a/drivers/gpio/gpio-nomadik.c b/drivers/gpio/gpio-nomadik.c
new file mode 100644
index 000000000000..e39477e1a58f
--- /dev/null
+++ b/drivers/gpio/gpio-nomadik.c
@@ -0,0 +1,660 @@
[...]
quoted
+static int nmk_gpio_probe(struct platform_device *dev)
+{
[...]
quoted
+     ret = gpiochip_add_data(chip, nmk_chip);
Use devm_gpiochip_add_data() to cleanup on unbind, before nmk_chip goes
away. Or make the driver un-unbindable via suppress_bind_attrs. In that
case you could drop devm_ prefixes everywhere for consistency.
No! Why? What about error paths in probe() where you want to undo everything?

Bart
regards
Philipp
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help