]> git.baikalelectronics.ru Git - kernel.git/commit
serial: mctrl-gpio: simplify init routine
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Thu, 12 Feb 2015 14:24:42 +0000 (15:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Mar 2015 02:15:04 +0000 (03:15 +0100)
commit6de39c773b52b277cfa58005205354836f5971b0
tree6835a58888a86ec7cb697a91e93266a0f2780969
parent50ff0c0bcf5e8bbb2353f5f87548bf09cb528f36
serial: mctrl-gpio: simplify init routine

Instead of ignoring errors returned by devm_gpiod_get_index use
devm_gpiod_get_index_optional which results in slightly more strict
error handling which is good.

Also use the fourth parameter to devm_gpiod_get_index_optional to be
able to drop the explicit direction setting.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_mctrl_gpio.c