OSDN Git Service

Input: drv260x - fix initializing overdrive voltage
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 11 Dec 2016 06:56:21 +0000 (22:56 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Apr 2018 09:31:56 +0000 (11:31 +0200)
commit 74c82dae6c474933f2be401976e1530b5f623221 upstream.

We were accidentally initializing haptics->rated_voltage twice, and did not
initialize overdrive voltage.

Acked-by: Dan Murphy <dmurphy@ti.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Amit Pundir <amit.pundir@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/input/misc/drv260x.c

index 930424e..251d64c 100644 (file)
@@ -521,7 +521,7 @@ static int drv260x_probe(struct i2c_client *client,
        if (!haptics)
                return -ENOMEM;
 
-       haptics->rated_voltage = DRV260X_DEF_OD_CLAMP_VOLT;
+       haptics->overdrive_voltage = DRV260X_DEF_OD_CLAMP_VOLT;
        haptics->rated_voltage = DRV260X_DEF_RATED_VOLT;
 
        if (pdata) {