The driver was using a 16 bit field for storing the shadow value of the shift
register cascade. This resulted in only the first 2 shift registeres receiving
the correct data. The third shift register would always receive 0x00.

Fix this by using a 32bit field for the shadow value.

Signed-off-by: John Crispin <blo...@openwrt.org>
Cc: linux-kernel@vger.kernel.org
---
 drivers/gpio/gpio-stp-xway.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpio/gpio-stp-xway.c b/drivers/gpio/gpio-stp-xway.c
index e35096b..8bead0b 100644
--- a/drivers/gpio/gpio-stp-xway.c
+++ b/drivers/gpio/gpio-stp-xway.c
@@ -82,7 +82,7 @@ struct xway_stp {
        struct gpio_chip gc;
        void __iomem *virt;
        u32 edge;       /* rising or falling edge triggered shift register */
-       u16 shadow;     /* shadow the shift registers state */
+       u32 shadow;     /* shadow the shift registers state */
        u8 groups;      /* we can drive 1-3 groups of 8bit each */
        u8 dsl;         /* the 2 LSBs can be driven by the dsl core */
        u8 phy1;        /* 3 bits can be driven by phy1 */
-- 
1.7.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to