lkml.org 
[lkml]   [2006]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] input: use event handler in ff drivers
Call input_ff_event() from drivers when they receive EV_FF event through
event() of struct input_dev.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>

---

This is to be applied after other patches in my last patchset.

input/joystick/iforce/iforce-main.c | 1 +
input/misc/uinput.c | 3 +++
usb/input/hid-input.c | 3 +++
3 files changed, 7 insertions(+)
Index: linux-2.6.17-rc4-git12/drivers/usb/input/hid-input.c
===================================================================
--- linux-2.6.17-rc4-git12.orig/drivers/usb/input/hid-input.c 2006-05-27 03:45:06.000000000 +0300
+++ linux-2.6.17-rc4-git12/drivers/usb/input/hid-input.c 2006-05-27 03:45:07.000000000 +0300
@@ -717,6 +717,9 @@ static int hidinput_input_event(struct i
struct hid_field *field;
int offset;

+ if (type == EV_FF)
+ return input_ff_event(dev, type, code, value);
+
if (type != EV_LED)
return -1;

Index: linux-2.6.17-rc4-git12/drivers/input/joystick/iforce/iforce-main.c
===================================================================
--- linux-2.6.17-rc4-git12.orig/drivers/input/joystick/iforce/iforce-main.c 2006-05-27 03:45:06.000000000 +0300
+++ linux-2.6.17-rc4-git12/drivers/input/joystick/iforce/iforce-main.c 2006-05-27 03:45:07.000000000 +0300
@@ -306,6 +306,7 @@ int iforce_init_device(struct iforce *if
input_dev->name = "Unknown I-Force device";
input_dev->open = iforce_open;
input_dev->close = iforce_release;
+ input_dev->event = input_ff_event;
if (!ff_err)
input_dev->ff_effects_max = 10;

Index: linux-2.6.17-rc4-git12/drivers/input/misc/uinput.c
===================================================================
--- linux-2.6.17-rc4-git12.orig/drivers/input/misc/uinput.c 2006-05-27 03:45:06.000000000 +0300
+++ linux-2.6.17-rc4-git12/drivers/input/misc/uinput.c 2006-05-27 03:45:07.000000000 +0300
@@ -43,6 +43,9 @@ static int uinput_dev_event(struct input
{
struct uinput_device *udev;

+ if (type == EV_FF)
+ return input_ff_event(dev, type, code, value);
+
udev = dev->private;

udev->buff[udev->head].type = type;
\
 
 \ /
  Last update: 2006-05-27 02:56    [W:0.057 / U:0.488 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site