Thread (7 messages) 7 messages, 3 authors, 2015-02-12

Re: [PATCH v3 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines

From: Alexander Shiyan <hidden>
Date: 2015-02-12 13:45:18
Also in: linux-arm-kernel, linux-gpio

Четверг, 12 февраля 2015, 14:29 +01:00 от Uwe Kleine-König [off-list ref]:
...
quoted
+int mctrl_gpio_request_irqs(struct mctrl_gpios *gpios)
quoted
+{
quoted
+	struct uart_port *port = gpios->port;
quoted
+	int *irq = gpios->irq;
quoted
+	enum mctrl_gpio_idx i;
quoted
+	int err = 0;
quoted
+
quoted
+	/* When gpios is NULL just gpio irqs are also never set
quoted
+	 * so return without any error */
quoted
+	if (IS_ERR_OR_NULL(gpios))
quoted
+		return err;
I'd expect drivers using mctrl-gpio to error out if mctrl_gpio_init_dt

fails. Also mctrl_gpio_init_dt never returns NULL, so IMHO this check

can be dropped. (There are more places in mctrl-gpio that should be

fixed accordingly.
At least this check should be moved to start of this function due
future usage of gpios->port and gpios->irq.

---

_______________________________________________
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