gpiolib: use better errno if get_direction is not available
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 11 Jul 2018 16:33:19 +0000 (18:33 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 14 Sep 2018 08:45:13 +0000 (10:45 +0200)
commitd0121b8548bcb9a640de38c13e239493c87c44f4
treea80858c70e5850766297912b25776330fb392c8e
parentfa38869b0161484f28a7e1f34535d5825dca6488
gpiolib: use better errno if get_direction is not available

EINVAL is very generic, use ENOTSUPP in case the gpiochip does not
provide this function. While removing the assignment from the 'status'
variable, use better indentation in the declaration block.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c