Re: pbbuttonsd doesn't work with 2.6.15 (git tree)
> > Didn't work in 2.6.14 - uinput device open was broken. The following patch
> > fixes it:
>
> Can you send that patch to greg for the stable series ?
Yep. There's still something strange with evdev though - it shows a usage
count of 14 regardless of how many devices I keep open. Closed devices
don't seem to get reused.
Anyway, this works for me:
diff --git a/drivers/input/misc/uinput.c b/drivers/input/misc/uinput.c
index 948c1cc..c696ae3 100644
--- a/drivers/input/misc/uinput.c
+++ b/drivers/input/misc/uinput.c
@@ -199,10 +199,9 @@ static int uinput_open(struct inode *ino
spin_lock_init(&newdev->requests_lock);
init_waitqueue_head(&newdev->requests_waitq);
- newinput = kmalloc(sizeof(struct input_dev), GFP_KERNEL);
+ newinput = input_allocate_device();
if (!newinput)
goto cleanup;
- memset(newinput, 0, sizeof(struct input_dev));
newdev->dev = newinput;
@@ -373,7 +372,6 @@ static int uinput_burn_device(struct uin
kfree(udev->dev->name);
kfree(udev->dev->phys);
- kfree(udev->dev);
kfree(udev);
return 0;
Signed-off-by: Michael Schmitz <schmitz@biophys.uni-duesseldorf.de>
Can you apply this to 2.6.14, Greg?
Michael
Reply to: