Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Saeed Bishara and committed by
Dmitry Torokhov
eeafa5ef ddaa4343

+5 -6
+5 -6
drivers/input/mouse/gpio_mouse.c
··· 46 46 input_sync(input); 47 47 } 48 48 49 - static int __init gpio_mouse_probe(struct platform_device *pdev) 49 + static int __devinit gpio_mouse_probe(struct platform_device *pdev) 50 50 { 51 51 struct gpio_mouse_platform_data *pdata = pdev->dev.platform_data; 52 52 struct input_polled_dev *input_poll; ··· 170 170 return 0; 171 171 } 172 172 173 - /* work with hotplug and coldplug */ 174 - MODULE_ALIAS("platform:gpio_mouse"); 175 - 176 173 static struct platform_driver gpio_mouse_device_driver = { 174 + .probe = gpio_mouse_probe, 177 175 .remove = __devexit_p(gpio_mouse_remove), 178 176 .driver = { 179 177 .name = "gpio_mouse", ··· 181 183 182 184 static int __init gpio_mouse_init(void) 183 185 { 184 - return platform_driver_probe(&gpio_mouse_device_driver, 185 - gpio_mouse_probe); 186 + return platform_driver_register(&gpio_mouse_device_driver); 186 187 } 187 188 module_init(gpio_mouse_init); 188 189 ··· 194 197 MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); 195 198 MODULE_DESCRIPTION("GPIO mouse driver"); 196 199 MODULE_LICENSE("GPL"); 200 + MODULE_ALIAS("platform:gpio_mouse"); /* work with hotplug and coldplug */ 201 +