diff options
Diffstat (limited to 'drivers/input/serio/rpckbd.c')
-rw-r--r-- | drivers/input/serio/rpckbd.c | 21 |
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 | */ |
110 | static int __devinit rpckbd_probe(struct device *dev) | 110 | static 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 | ||
132 | static int __devexit rpckbd_remove(struct device *dev) | 132 | static 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 | ||
139 | static struct device_driver rpckbd_driver = { | 139 | static 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 | ||
146 | static int __init rpckbd_init(void) | 147 | static int __init rpckbd_init(void) |
147 | { | 148 | { |
148 | return driver_register(&rpckbd_driver); | 149 | return platform_driver_register(&rpckbd_driver); |
149 | } | 150 | } |
150 | 151 | ||
151 | static void __exit rpckbd_exit(void) | 152 | static void __exit rpckbd_exit(void) |
152 | { | 153 | { |
153 | driver_unregister(&rpckbd_driver); | 154 | platform_driver_unregister(&rpckbd_driver); |
154 | } | 155 | } |
155 | 156 | ||
156 | module_init(rpckbd_init); | 157 | module_init(rpckbd_init); |