diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2010-10-26 17:21:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-26 19:52:04 -0400 |
commit | 1f9fa5216eacf4fdf9d3e4ab57feb8b642f0e78b (patch) | |
tree | e77844b9efe465f9265d502f91c1b0864a64b590 | |
parent | 6915e04f8847bea16d0890f559694ad8eedd026c (diff) |
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 <michael.hennerich@analog.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Chris Verges <chrisv@cyberswitching.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | drivers/misc/ad525x_dpot-spi.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
53 | static int write16(void *client, u8 reg, u8 val) | 53 | static int write16(void *client, u8 reg, u8 val) |
54 | { | 54 | { |
55 | u8 data[2] = {reg, val}; | 55 | u8 data[2] = {reg, val}; |
56 | return spi_write(client, data, 1); | 56 | return spi_write(client, data, 2); |
57 | } | 57 | } |
58 | 58 | ||
59 | static int write24(void *client, u8 reg, u16 val) | 59 | static int write24(void *client, u8 reg, u16 val) |
60 | { | 60 | { |
61 | u8 data[3] = {reg, val >> 8, val}; | 61 | u8 data[3] = {reg, val >> 8, val}; |
62 | return spi_write(client, data, 1); | 62 | return spi_write(client, data, 3); |
63 | } | 63 | } |
64 | 64 | ||
65 | static int read8(void *client) | 65 | static int read8(void *client) |