public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* uinput broken in 2.6.15-rc1
@ 2005-11-14  5:11 Neil Brown
  2005-11-14  6:10 ` Dmitry Torokhov
  0 siblings, 1 reply; 2+ messages in thread
From: Neil Brown @ 2005-11-14  5:11 UTC (permalink / raw)
  To: Aristeu Sergio Rozanski Filho, dtor_core, vojtech; +Cc: linux-kernel



The 'uinput' driver doesn't work well in 2.6.15-rc1.  It
triggers this complaint:
		printk(KERN_WARNING "input: device %s is statically allocated, will not register\n"
			"Please convert to input_allocate_device() or contact dtor_core@ameritech.net\n",
			dev->name ? dev->name : "<Unknown>");

The following patch fixes it for me, but I'm not convinced it is
correct.  I would expect it to need a special 'free' routine to match
the special 'alloc' routine, but I couldn't easily find one.

NeilBrown

Signed-off-by: Neil Brown <neilb@suse.de>

### Diffstat output
 ./drivers/input/misc/uinput.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff ./drivers/input/misc/uinput.c~current~ ./drivers/input/misc/uinput.c
--- ./drivers/input/misc/uinput.c~current~	2005-11-14 14:34:56.000000000 +1100
+++ ./drivers/input/misc/uinput.c	2005-11-14 15:17:01.000000000 +1100
@@ -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;
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-11-14  6:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-14  5:11 uinput broken in 2.6.15-rc1 Neil Brown
2005-11-14  6:10 ` Dmitry Torokhov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox