lkml.org 
[lkml]   [2004]   [Jun]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectRe: [PATCH] serio.c: dynamically control serio ports bindings via procfs
From
Date


The name fix on serio devices is as simply as the following example,
which can be applied to the 'atkbd' module. We just need to add back
the .name field to the 'struct serio_dev'. My previous patch can
detect this and use the meaningful name immediately!



--- linux-2.6.7-rc1/drivers/input/keyboard/atkbd.c 2004/06/01 07:45:00 1.2
+++ linux-2.6.7-rc1.name-fix/drivers/input/keyboard/atkbd.c 2004/06/02 17:44:47
@@ -818,20 +818,21 @@
atkbd_enable(atkbd);

if (atkbd_command(atkbd, param, ATKBD_CMD_SETLEDS))
return -1;
}

return 0;
}

static struct serio_dev atkbd_dev = {
+ .name = "atkbd",
.interrupt = atkbd_interrupt,
.connect = atkbd_connect,
.reconnect = atkbd_reconnect,
.disconnect = atkbd_disconnect,
.cleanup = atkbd_cleanup,
};

int __init atkbd_init(void)
{
serio_register_device(&atkbd_dev);



--
Sau Dan LEE 李守敦(Big5) ~{@nJX6X~}(HZ)
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.027 / U:0.512 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site