]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drivers/misc/ad525x_dpot: AD5274 fix RDAC read back errors
authorMichael Hennerich <michael.hennerich@analog.com>
Mon, 22 Feb 2016 09:20:24 +0000 (10:20 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 2 Mar 2016 00:55:13 +0000 (16:55 -0800)
Fix RDAC read back errors caused by a typo. Value must shift by 2.

Fixes: a4bd394956f2 ("drivers/misc/ad525x_dpot.c: new features")
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ad525x_dpot.c

index 15e88078ba1e6a70ec82b3c713fd8c19ebb425d7..f1a0b99f5a9a3e0cbc44eb1a69ac774f134569f4 100644 (file)
@@ -216,7 +216,7 @@ static s32 dpot_read_i2c(struct dpot_data *dpot, u8 reg)
                         */
                        value = swab16(value);
 
-                       if (dpot->uid == DPOT_UID(AD5271_ID))
+                       if (dpot->uid == DPOT_UID(AD5274_ID))
                                value = value >> 2;
                return value;
        default: