]> 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)
committerSasha Levin <sasha.levin@oracle.com>
Wed, 20 Apr 2016 05:08:53 +0000 (01:08 -0400)
commit7227a0df99e50b2c5150e2fe0203e605a9d03033
tree5fd85bc142d5e402fd45a182f79210b84d17a969
parent0ffbec8de4d115f236ea792c71f4ca123f53829c
gpio: pca953x: Use correct u16 value for register word write

[ Upstream commit 9b8e3ec34318663affced3c14d960e78d760dd9a ]

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

Cc: stable@vger.kernel.org
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: Sasha Levin <sasha.levin@oracle.com>
drivers/gpio/gpio-pca953x.c