[PATCH 13/13] staging: unisys: visorinput: remove extraneous do_key function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tim Sell <Timothy.Sell@xxxxxxxxxx>

do_key() is no longer needed.

Signed-off-by: Tim Sell <Timothy.Sell@xxxxxxxxxx>
Signed-off-by: Benjamin Romer <benjamin.romer@xxxxxxxxxx>
---
 drivers/staging/unisys/visorinput/visorinput.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index a002e07..3a1b24f 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -452,12 +452,6 @@ visorinput_remove(struct visor_device *dev)
 	kfree(devdata);
 }
 
-static void
-do_key(struct input_dev *inpt, int keycode, int down)
-{
-	input_report_key(inpt, keycode, down);
-}
-
 /*
  * Make it so the current locking state of the locking key indicated by
  * <keycode> is as indicated by <desired_state> (1=locked, 0=unlocked).
@@ -490,9 +484,9 @@ handle_locking_key(struct input_dev *visorinput_dev,
 		int old_state = (test_bit(led, visorinput_dev->led) != 0);
 
 		if (old_state != desired_state) {
-			do_key(visorinput_dev, keycode, 1);
+			input_report_key(visorinput_dev, keycode, 1);
 			input_sync(visorinput_dev);
-			do_key(visorinput_dev, keycode, 0);
+			input_report_key(visorinput_dev, keycode, 0);
 			input_sync(visorinput_dev);
 			__change_bit(led, visorinput_dev->led);
 		}
@@ -563,17 +557,17 @@ visorinput_channel_interrupt(struct visor_device *dev)
 		keycode = scancode_to_keycode(scancode);
 		switch (r.activity.action) {
 		case inputaction_key_down:
-			do_key(visorinput_dev, keycode, 1);
+			input_report_key(visorinput_dev, keycode, 1);
 			input_sync(visorinput_dev);
 			break;
 		case inputaction_key_up:
-			do_key(visorinput_dev, keycode, 0);
+			input_report_key(visorinput_dev, keycode, 0);
 			input_sync(visorinput_dev);
 			break;
 		case inputaction_key_down_up:
-			do_key(visorinput_dev, keycode, 1);
+			input_report_key(visorinput_dev, keycode, 1);
 			input_sync(visorinput_dev);
-			do_key(visorinput_dev, keycode, 0);
+			input_report_key(visorinput_dev, keycode, 0);
 			input_sync(visorinput_dev);
 			break;
 		case inputaction_set_locking_key_state:
-- 
2.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux