]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
Input: ads7864 - check return value of regulator enable
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 4 Mar 2013 04:19:07 +0000 (20:19 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 11 Mar 2013 01:33:15 +0000 (18:33 -0700)
At least print a warning if we can't power the device up.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/ads7846.c

index 4f702b3ec1a3f1f9e4210d4e666c5be1beea8801..434c3df250caa3bc0a058a890e6b64f9bd78b450 100644 (file)
@@ -236,7 +236,12 @@ static void __ads7846_disable(struct ads7846 *ts)
 /* Must be called with ts->lock held */
 static void __ads7846_enable(struct ads7846 *ts)
 {
-       regulator_enable(ts->reg);
+       int error;
+
+       error = regulator_enable(ts->reg);
+       if (error != 0)
+               dev_err(&ts->spi->dev, "Failed to enable supply: %d\n", error);
+
        ads7846_restart(ts);
 }