mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
Input: mouse - use macro module_platform_driver()
Commit 940ab88962
introduced a new macro to
save some platform_driver boilerplate code. Use it.
Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
parent
840a746be2
commit
4fcdeac5ac
3 changed files with 4 additions and 39 deletions
|
@ -140,25 +140,13 @@ static int __exit amimouse_remove(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct platform_driver amimouse_driver = {
|
static struct platform_driver amimouse_driver = {
|
||||||
|
.probe = amimouse_probe,
|
||||||
.remove = __exit_p(amimouse_remove),
|
.remove = __exit_p(amimouse_remove),
|
||||||
.driver = {
|
.driver = {
|
||||||
.name = "amiga-mouse",
|
.name = "amiga-mouse",
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
module_platform_driver(amimouse_driver);
|
||||||
static int __init amimouse_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_probe(&amimouse_driver, amimouse_probe);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(amimouse_init);
|
|
||||||
|
|
||||||
static void __exit amimouse_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&amimouse_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_exit(amimouse_exit);
|
|
||||||
|
|
||||||
MODULE_ALIAS("platform:amiga-mouse");
|
MODULE_ALIAS("platform:amiga-mouse");
|
||||||
|
|
|
@ -178,18 +178,7 @@ static struct platform_driver gpio_mouse_device_driver = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
module_platform_driver(gpio_mouse_device_driver);
|
||||||
static int __init gpio_mouse_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_register(&gpio_mouse_device_driver);
|
|
||||||
}
|
|
||||||
module_init(gpio_mouse_init);
|
|
||||||
|
|
||||||
static void __exit gpio_mouse_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&gpio_mouse_device_driver);
|
|
||||||
}
|
|
||||||
module_exit(gpio_mouse_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
|
MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
|
||||||
MODULE_DESCRIPTION("GPIO mouse driver");
|
MODULE_DESCRIPTION("GPIO mouse driver");
|
||||||
|
|
|
@ -250,19 +250,7 @@ static struct platform_driver pxa930_trkball_driver = {
|
||||||
.probe = pxa930_trkball_probe,
|
.probe = pxa930_trkball_probe,
|
||||||
.remove = __devexit_p(pxa930_trkball_remove),
|
.remove = __devexit_p(pxa930_trkball_remove),
|
||||||
};
|
};
|
||||||
|
module_platform_driver(pxa930_trkball_driver);
|
||||||
static int __init pxa930_trkball_init(void)
|
|
||||||
{
|
|
||||||
return platform_driver_register(&pxa930_trkball_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void __exit pxa930_trkball_exit(void)
|
|
||||||
{
|
|
||||||
platform_driver_unregister(&pxa930_trkball_driver);
|
|
||||||
}
|
|
||||||
|
|
||||||
module_init(pxa930_trkball_init);
|
|
||||||
module_exit(pxa930_trkball_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Yong Yao <yaoyong@marvell.com>");
|
MODULE_AUTHOR("Yong Yao <yaoyong@marvell.com>");
|
||||||
MODULE_DESCRIPTION("PXA930 Trackball Mouse Driver");
|
MODULE_DESCRIPTION("PXA930 Trackball Mouse Driver");
|
||||||
|
|
Loading…
Add table
Reference in a new issue