]> git.baikalelectronics.ru Git - kernel.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)
commit7a9b375cb8fbff8f52131a2af1438ad5344e26ef
treef388e4c8c4799286b85f471326422237ed1a0e7f
parent6b22d82a83527e5defd60dbb1fd9fe0e6b63edde
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: ee485d7bf66e ("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