]> git.itanic.dy.fi Git - linux-stable/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 6 Aug 2019 17:08:16 +0000 (19:08 +0200)
commitcda67846b748a9d9005587e3bed35ba22e2d0d5e
tree53af6867df132dccbfbee35f90e1472700bfa678
parent8acd3fc56a6f6dd2b5de148033e2d8fbfd871947
gpiolib: Preserve desc->flags when setting state

commit d95da993383c78f7efd25957ba3af23af4b1c613 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpiolib.c