From: Michael Hennerich Date: Tue, 26 Oct 2010 21:21:16 +0000 (-0700) Subject: drivers/misc/ad525x_dpot.c: fix typo in spi write16 and write24 transfer counts X-Git-Tag: firefly_0821_release~7613^2~3628^2~169 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=1f9fa5216eacf4fdf9d3e4ab57feb8b642f0e78b;p=firefly-linux-kernel-4.4.55.git drivers/misc/ad525x_dpot.c: fix typo in spi write16 and write24 transfer counts This is a bug fix. Some SPI connected devices using 16/24 bit accesses, previously failed, now work. This typo slipped in after testing, during some restructuring. Signed-off-by: Michael Hennerich Cc: Mike Frysinger Cc: Chris Verges Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/misc/ad525x_dpot-spi.c b/drivers/misc/ad525x_dpot-spi.c index b8c6df9c8437..6cfcb636577a 100644 --- a/drivers/misc/ad525x_dpot-spi.c +++ b/drivers/misc/ad525x_dpot-spi.c @@ -53,13 +53,13 @@ static int write8(void *client, u8 val) static int write16(void *client, u8 reg, u8 val) { u8 data[2] = {reg, val}; - return spi_write(client, data, 1); + return spi_write(client, data, 2); } static int write24(void *client, u8 reg, u16 val) { u8 data[3] = {reg, val >> 8, val}; - return spi_write(client, data, 1); + return spi_write(client, data, 3); } static int read8(void *client)