gpio: pca953x: Use correct u16 value for register word write
commitda2469a40edc718b017ca420c3f1fdae15d4920d
authorYong Li <sdliyong@gmail.com>
Wed, 30 Mar 2016 06:49:14 +0000 (30 14:49 +0800)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 30 Apr 2016 22:06:09 +0000 (1 00:06 +0200)
treef943348a77cac3a42984f62d94b479a75fdcf9a9
parent6fdcc6e3762f19ff1833ef33c8aab018d2c3e781
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>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/gpio/gpio-pca953x.c