Commit d69f0a43 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Dmitry Torokhov
Browse files

Input: use input_device_enabled()

parent 39be39ce
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -166,7 +166,7 @@ static ssize_t input_dev_set_poll_interval(struct device *dev,

	poller->poll_interval = interval;

	if (input->users) {
	if (input_device_enabled(input)) {
		cancel_delayed_work_sync(&poller->work);
		if (poller->poll_interval > 0)
			input_dev_poller_queue_work(poller);
+2 −2
Original line number Diff line number Diff line
@@ -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) {
			/*
+1 −1
Original line number Diff line number Diff line
@@ -208,7 +208,7 @@ static int ep93xx_keypad_resume(struct device *dev)

	mutex_lock(&input_dev->mutex);

	if (input_dev->users) {
	if (input_device_enabled(input_dev)) {
		if (!keypad->enabled) {
			ep93xx_keypad_config(keypad);
			clk_enable(keypad->clk);
+2 −2
Original line number Diff line number Diff line
@@ -965,7 +965,7 @@ static int __maybe_unused gpio_keys_suspend(struct device *dev)
			return error;
	} else {
		mutex_lock(&input->mutex);
		if (input->users)
		if (input_device_enabled(input))
			gpio_keys_close(input);
		mutex_unlock(&input->mutex);
	}
@@ -983,7 +983,7 @@ static int __maybe_unused gpio_keys_resume(struct device *dev)
		gpio_keys_disable_wakeup(ddata);
	} else {
		mutex_lock(&input->mutex);
		if (input->users)
		if (input_device_enabled(input))
			error = gpio_keys_open(input);
		mutex_unlock(&input->mutex);
	}
+2 −2
Original line number Diff line number Diff line
@@ -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;
Loading