aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/serio/rpckbd.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 12:24:26 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-11 12:24:26 -0500
commit5643f000c1e10ab991182478b76550e1364c3570 (patch)
tree950b2f61a5dd742de1c668ba968a9c8a99f1eab6 /drivers/input/serio/rpckbd.c
parent177294d19174cf92de22434bb1fc9a8ecdbbe658 (diff)
parent3ae5eaec1d2d9c0cf53745352e7d4b152810ba24 (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-drvmodel
Diffstat (limited to 'drivers/input/serio/rpckbd.c')
-rw-r--r--drivers/input/serio/rpckbd.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/input/serio/rpckbd.c b/drivers/input/serio/rpckbd.c
index 52c49258f8a4..a3bd11589bc3 100644
--- a/drivers/input/serio/rpckbd.c
+++ b/drivers/input/serio/rpckbd.c
@@ -107,7 +107,7 @@ static void rpckbd_close(struct serio *port)
107 * Allocate and initialize serio structure for subsequent registration 107 * Allocate and initialize serio structure for subsequent registration
108 * with serio core. 108 * with serio core.
109 */ 109 */
110static int __devinit rpckbd_probe(struct device *dev) 110static int __devinit rpckbd_probe(struct platform_device *dev)
111{ 111{
112 struct serio *serio; 112 struct serio *serio;
113 113
@@ -120,37 +120,38 @@ static int __devinit rpckbd_probe(struct device *dev)
120 serio->write = rpckbd_write; 120 serio->write = rpckbd_write;
121 serio->open = rpckbd_open; 121 serio->open = rpckbd_open;
122 serio->close = rpckbd_close; 122 serio->close = rpckbd_close;
123 serio->dev.parent = dev; 123 serio->dev.parent = &dev->dev;
124 strlcpy(serio->name, "RiscPC PS/2 kbd port", sizeof(serio->name)); 124 strlcpy(serio->name, "RiscPC PS/2 kbd port", sizeof(serio->name));
125 strlcpy(serio->phys, "rpckbd/serio0", sizeof(serio->phys)); 125 strlcpy(serio->phys, "rpckbd/serio0", sizeof(serio->phys));
126 126
127 dev_set_drvdata(dev, serio); 127 platform_set_drvdata(dev, serio);
128 serio_register_port(serio); 128 serio_register_port(serio);
129 return 0; 129 return 0;
130} 130}
131 131
132static int __devexit rpckbd_remove(struct device *dev) 132static int __devexit rpckbd_remove(struct platform_device *dev)
133{ 133{
134 struct serio *serio = dev_get_drvdata(dev); 134 struct serio *serio = platform_get_drvdata(dev);
135 serio_unregister_port(serio); 135 serio_unregister_port(serio);
136 return 0; 136 return 0;
137} 137}
138 138
139static struct device_driver rpckbd_driver = { 139static struct platform_driver rpckbd_driver = {
140 .name = "kart",
141 .bus = &platform_bus_type,
142 .probe = rpckbd_probe, 140 .probe = rpckbd_probe,
143 .remove = __devexit_p(rpckbd_remove), 141 .remove = __devexit_p(rpckbd_remove),
142 .driver = {
143 .name = "kart",
144 },
144}; 145};
145 146
146static int __init rpckbd_init(void) 147static int __init rpckbd_init(void)
147{ 148{
148 return driver_register(&rpckbd_driver); 149 return platform_driver_register(&rpckbd_driver);
149} 150}
150 151
151static void __exit rpckbd_exit(void) 152static void __exit rpckbd_exit(void)
152{ 153{
153 driver_unregister(&rpckbd_driver); 154 platform_driver_unregister(&rpckbd_driver);
154} 155}
155 156
156module_init(rpckbd_init); 157module_init(rpckbd_init);