]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
Input: tsc2004/5 - fix regulator handling
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 10 Feb 2017 23:30:29 +0000 (15:30 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 12 Feb 2017 22:55:08 +0000 (14:55 -0800)
commitf7bf6f58675a76c08e6eee7fa5c264884eb5c599
treef388e4c8c4799286b85f471326422237ed1a0e7f
parent449aa83e69ff10d77fe088eadacafe1e97937c14
Input: tsc2004/5 - fix regulator handling

In case of an optional regulator missing, regulator core will return
ERR_PTR(-ENOENT) and not NULL, so the check for missing regulator is
incorrect. Also, the regulator is not optional, it may simply be missing
from platform description, so let's use devm_regulator_get() and rely on
regulator core to give us dummy supply when real one is not available.

Fixes: d257f2980feb ("Input: tsc2005 - convert to gpiod")
Acked-By: Sebastian Reichel <sre@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/touchscreen/tsc200x-core.c