diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-03 23:19:07 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2013-03-10 21:33:15 -0400 |
| commit | f94352f8db97b9a3b3c1ec45f6fef1400880168a (patch) | |
| tree | bc6adf329b569913ef5c22219124f47746ee97c5 /drivers/input | |
| parent | 39735019716e93914a366ac1fb2e78f91b170545 (diff) | |
Input: ads7864 - check return value of regulator enable
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>
Diffstat (limited to 'drivers/input')
| -rw-r--r-- | drivers/input/touchscreen/ads7846.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 4f702b3ec1a3..434c3df250ca 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c | |||
| @@ -236,7 +236,12 @@ static void __ads7846_disable(struct ads7846 *ts) | |||
| 236 | /* Must be called with ts->lock held */ | 236 | /* Must be called with ts->lock held */ |
| 237 | static void __ads7846_enable(struct ads7846 *ts) | 237 | static void __ads7846_enable(struct ads7846 *ts) |
| 238 | { | 238 | { |
| 239 | regulator_enable(ts->reg); | 239 | int error; |
| 240 | |||
| 241 | error = regulator_enable(ts->reg); | ||
| 242 | if (error != 0) | ||
| 243 | dev_err(&ts->spi->dev, "Failed to enable supply: %d\n", error); | ||
| 244 | |||
| 240 | ads7846_restart(ts); | 245 | ads7846_restart(ts); |
| 241 | } | 246 | } |
| 242 | 247 | ||
