Input: use input_device_enabled()
Use the newly added helper in relevant input drivers. Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com> Link: https://lore.kernel.org/r/20200608112211.12125-3-andrzej.p@collabora.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
committed by
Dmitry Torokhov
parent
39be39ceff
commit
d69f0a43c6
@@ -532,7 +532,7 @@ static int __maybe_unused imx_kbd_noirq_suspend(struct device *dev)
|
||||
/* imx kbd can wake up system even clock is disabled */
|
||||
mutex_lock(&input_dev->mutex);
|
||||
|
||||
if (input_dev->users)
|
||||
if (input_device_enabled(input_dev))
|
||||
clk_disable_unprepare(kbd->clk);
|
||||
|
||||
mutex_unlock(&input_dev->mutex);
|
||||
@@ -562,7 +562,7 @@ static int __maybe_unused imx_kbd_noirq_resume(struct device *dev)
|
||||
|
||||
mutex_lock(&input_dev->mutex);
|
||||
|
||||
if (input_dev->users) {
|
||||
if (input_device_enabled(input_dev)) {
|
||||
ret = clk_prepare_enable(kbd->clk);
|
||||
if (ret)
|
||||
goto err_clk;
|
||||
|
||||
Reference in New Issue
Block a user