ad525x_dpot: extend write argument to 16bits
authorMichael Hennerich <michael.hennerich@analog.com>
Mon, 24 May 2010 21:33:13 +0000 (14:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 25 May 2010 15:07:04 +0000 (08:07 -0700)
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>
drivers/misc/ad525x_dpot.c

index e6b274b5dbd61e6e4bb15b040fc4b500e6916236..ce92088bf0b8bdb9902e7d3d482f6355265b9154 100644 (file)
@@ -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)
@@ -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);