mirror of
https://github.com/torvalds/linux.git
synced 2024-11-17 17:41:44 +00:00
gpio: tb10x: use module_platform_driver to simplify the code
module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
e16dbf6011
commit
85aa391528
@ -324,18 +324,7 @@ static struct platform_driver tb10x_gpio_driver = {
|
||||
}
|
||||
};
|
||||
|
||||
static int __init ab_gpio_init(void)
|
||||
{
|
||||
return platform_driver_register(&tb10x_gpio_driver);
|
||||
}
|
||||
|
||||
static void __exit ab_gpio_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&tb10x_gpio_driver);
|
||||
}
|
||||
|
||||
module_init(ab_gpio_init);
|
||||
module_exit(ab_gpio_exit);
|
||||
module_platform_driver(tb10x_gpio_driver);
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION("tb10x gpio.");
|
||||
MODULE_VERSION("0.0.1");
|
||||
|
Loading…
Reference in New Issue
Block a user