]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
gpio: pca953x: Use correct u16 value for register word write
authorYong Li <sdliyong@gmail.com>
Wed, 30 Mar 2016 06:49:14 +0000 (14:49 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2016 06:45:22 +0000 (15:45 +0900)
commit08f056a7137716887e4059edc55d9e0abf414906
treec8cfbac2a91c9883e43ee383c7a2a9550f37af63
parentfe4ed37cd9f8b0c065a6fc72e6005af5bebddb68
gpio: pca953x: Use correct u16 value for register word write

commit 9b8e3ec34318663affced3c14d960e78d760dd9a upstream.

The current implementation only uses the first byte in val,
the second byte is always 0. Change it to use cpu_to_le16
to write the two bytes into the register

Signed-off-by: Yong Li <sdliyong@gmail.com>
Reviewed-by: Phil Reid <preid@electromag.com.au>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/gpio-pca953x.c