projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3973501
)
Input: ads7864 - check return value of regulator enable
author
Mark Brown
<
[email protected]
>
Mon, 4 Mar 2013 04:19:07 +0000
(20:19 -0800)
committer
Dmitry Torokhov
<
[email protected]
>
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 <
[email protected]
>
Signed-off-by: Dmitry Torokhov <
[email protected]
>
drivers/input/touchscreen/ads7846.c
patch
|
blob
|
history
diff --git
a/drivers/input/touchscreen/ads7846.c
b/drivers/input/touchscreen/ads7846.c
index 4f702b3ec1a3f1f9e4210d4e666c5be1beea8801..434c3df250caa3bc0a058a890e6b64f9bd78b450 100644
(file)
--- a/
drivers/input/touchscreen/ads7846.c
+++ b/
drivers/input/touchscreen/ads7846.c
@@
-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);
}