Skip to contentSkip to conversation

gpio_mouse: use standard driver registration method

PATCH Applied Saeed Bishara 2 participants 2 messages Jun 24, 2009 – Jun 30, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/input/mouse/gpio_mouse.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/input/mouse/gpio_mouse.c +2 -2
index 5e5eb88..f468864 100644
@@ -175,6 +175,7 @@ MODULE_ALIAS("platform:gpio_mouse");
 
 static struct platform_driver gpio_mouse_device_driver = {
 	.remove		= __devexit_p(gpio_mouse_remove),
+	.probe		= gpio_mouse_probe,
 	.driver		= {
 		.name	= "gpio_mouse",
 		.owner	= THIS_MODULE,
@@ -183,8 +184,7 @@ static struct platform_driver gpio_mouse_device_driver = {
 
 static int __init gpio_mouse_init(void)
 {
-	return platform_driver_probe(&gpio_mouse_device_driver,
-			gpio_mouse_probe);
+	return platform_driver_register(&gpio_mouse_device_driver);
 }
 module_init(gpio_mouse_init);
 
Signature · 1 line
1.6.0.4
maintainer Applied
#1 lore raw

Hi Saeed,

Quoted 3 lines · Saeed Bishara

This patch is needed when the gpio's became available only at late stages, for example, when using i2c gpio expander.

When changing from platform_driver_probe() to platform_driver_register() you also need to convert markings on the driver's probe() method from __init to __devinit.

Applied.

Signature · 1 line
Dmitry