Skip to content

Commit

Permalink
ad525x_dpot: extend write argument to 16bits
Browse files Browse the repository at this point in the history
The possible output data is 16bits, not 8bits, so don't truncate it.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Michael Hennerich authored and Linus Torvalds committed May 25, 2010
1 parent 0993dbe commit 0c53b9f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/misc/ad525x_dpot.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ enum dpot_devid {
#define AD525X_INC_ALL (AD525X_I2C_CMD | (0xB << 3))

static s32 ad525x_read(struct i2c_client *client, u8 reg);
static s32 ad525x_write(struct i2c_client *client, u8 reg, u8 value);
static s32 ad525x_write(struct i2c_client *client, u8 reg, u16 value);

/*
* Client data (each client gets its own)
Expand Down Expand Up @@ -296,7 +296,7 @@ static s32 ad525x_read(struct i2c_client *client, u8 reg)
* A negative return value indicates an error occurred while reading
* the register.
*/
static s32 ad525x_write(struct i2c_client *client, u8 reg, u8 value)
static s32 ad525x_write(struct i2c_client *client, u8 reg, u16 value)
{
struct dpot_data *data = i2c_get_clientdata(client);

Expand Down

0 comments on commit 0c53b9f

Please sign in to comment.