aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaeed Bishara <saeed@marvell.com>2009-07-08 01:11:52 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-08 01:47:14 -0400
commiteeafa5ef6de5acf678624a21f7dba7d43ba73845 (patch)
tree01ed711c43e518c571b6f46eeffd9302f32d2717
parentddaa43433dd77535e4e132787f199f58ce224f44 (diff)
Input: gpio_mouse - use standard driver registration method
This patch is needed when the gpio's became available only at late stages, for example, when using i2c gpio expander. Signed-off-by: Saeed Bishara <saeed@marvell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
-rw-r--r--drivers/input/mouse/gpio_mouse.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c
index 5e5eb88d8d1e..7b6ce178f1b6 100644
--- a/drivers/input/mouse/gpio_mouse.c
+++ b/drivers/input/mouse/gpio_mouse.c
@@ -46,7 +46,7 @@ static void gpio_mouse_scan(struct input_polled_dev *dev)
46 input_sync(input); 46 input_sync(input);
47} 47}
48 48
49static int __init gpio_mouse_probe(struct platform_device *pdev) 49static int __devinit gpio_mouse_probe(struct platform_device *pdev)
50{ 50{
51 struct gpio_mouse_platform_data *pdata = pdev->dev.platform_data; 51 struct gpio_mouse_platform_data *pdata = pdev->dev.platform_data;
52 struct input_polled_dev *input_poll; 52 struct input_polled_dev *input_poll;
@@ -170,10 +170,8 @@ static int __devexit gpio_mouse_remove(struct platform_device *pdev)
170 return 0; 170 return 0;
171} 171}
172 172
173/* work with hotplug and coldplug */
174MODULE_ALIAS("platform:gpio_mouse");
175
176static struct platform_driver gpio_mouse_device_driver = { 173static struct platform_driver gpio_mouse_device_driver = {
174 .probe = gpio_mouse_probe,
177 .remove = __devexit_p(gpio_mouse_remove), 175 .remove = __devexit_p(gpio_mouse_remove),
178 .driver = { 176 .driver = {
179 .name = "gpio_mouse", 177 .name = "gpio_mouse",
@@ -183,8 +181,7 @@ static struct platform_driver gpio_mouse_device_driver = {
183 181
184static int __init gpio_mouse_init(void) 182static int __init gpio_mouse_init(void)
185{ 183{
186 return platform_driver_probe(&gpio_mouse_device_driver, 184 return platform_driver_register(&gpio_mouse_device_driver);
187 gpio_mouse_probe);
188} 185}
189module_init(gpio_mouse_init); 186module_init(gpio_mouse_init);
190 187
@@ -197,3 +194,5 @@ module_exit(gpio_mouse_exit);
197MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); 194MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>");
198MODULE_DESCRIPTION("GPIO mouse driver"); 195MODULE_DESCRIPTION("GPIO mouse driver");
199MODULE_LICENSE("GPL"); 196MODULE_LICENSE("GPL");
197MODULE_ALIAS("platform:gpio_mouse"); /* work with hotplug and coldplug */
198