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
@@ -1902,7 +1902,7 @@ static int xpad_suspend(struct usb_interface *intf, pm_message_t message)
|
||||
xpad360w_poweroff_controller(xpad);
|
||||
} else {
|
||||
mutex_lock(&input->mutex);
|
||||
if (input->users)
|
||||
if (input_device_enabled(input))
|
||||
xpad_stop_input(xpad);
|
||||
mutex_unlock(&input->mutex);
|
||||
}
|
||||
@@ -1922,7 +1922,7 @@ static int xpad_resume(struct usb_interface *intf)
|
||||
retval = xpad360w_start_input(xpad);
|
||||
} else {
|
||||
mutex_lock(&input->mutex);
|
||||
if (input->users) {
|
||||
if (input_device_enabled(input)) {
|
||||
retval = xpad_start_input(xpad);
|
||||
} else if (xpad->xtype == XTYPE_XBOXONE) {
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user