gpiolib: Preserve desc->flags when setting state
authorChris Packham <chris.packham@alliedtelesis.co.nz>
Sun, 7 Jul 2019 20:35:58 +0000 (08:35 +1200)
committerLinus Walleij <linus.walleij@linaro.org>
Sun, 28 Jul 2019 22:57:39 +0000 (00:57 +0200)
commitd95da993383c78f7efd25957ba3af23af4b1c613
tree6112c17b8f8b98373a65be0a0414acde4b852bfb
parent238644ce4b50a16f1c028d2b92ab2947f61d322e
gpiolib: Preserve desc->flags when setting state

desc->flags may already have values set by of_gpiochip_add() so make
sure that this isn't undone when setting the initial direction.

Cc: stable@vger.kernel.org
Fixes: 3edfb7bd76bd1cba ("gpiolib: Show correct direction from the beginning")
Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20190707203558.10993-1-chris.packham@alliedtelesis.co.nz
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib.c