mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
gpio: zynq: use module_platform_driver to simplify the code
module_platform_driver() makes the code simpler by eliminating boilerplate code. Signed-off-by: Srinivas Neeli <srinivas.neeli@xilinx.com> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
This commit is contained in:
parent
622096fdff
commit
c43ce47402
@ -1020,22 +1020,7 @@ static struct platform_driver zynq_gpio_driver = {
|
||||
.remove = zynq_gpio_remove,
|
||||
};
|
||||
|
||||
/**
|
||||
* zynq_gpio_init - Initial driver registration call
|
||||
*
|
||||
* Return: value from platform_driver_register
|
||||
*/
|
||||
static int __init zynq_gpio_init(void)
|
||||
{
|
||||
return platform_driver_register(&zynq_gpio_driver);
|
||||
}
|
||||
postcore_initcall(zynq_gpio_init);
|
||||
|
||||
static void __exit zynq_gpio_exit(void)
|
||||
{
|
||||
platform_driver_unregister(&zynq_gpio_driver);
|
||||
}
|
||||
module_exit(zynq_gpio_exit);
|
||||
module_platform_driver(zynq_gpio_driver);
|
||||
|
||||
MODULE_AUTHOR("Xilinx Inc.");
|
||||
MODULE_DESCRIPTION("Zynq GPIO driver");
|
||||
|
Loading…
Reference in New Issue
Block a user