summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-zynq.c
diff options
context:
space:
mode:
authorSrinivas Neeli <srinivas.neeli@xilinx.com>2021-04-09 16:08:04 +0200
committerBartosz Golaszewski <bgolaszewski@baylibre.com>2021-06-14 20:20:19 +0200
commitc43ce4740249b485846093f8a66220b25fb86290 (patch)
tree8fcaf734ff11ec5fabcea98feb00acfcaf9eb1b8 /drivers/gpio/gpio-zynq.c
parentgpio: idt3243x: Fix return value check in idt_gpio_probe() (diff)
downloadlinux-c43ce4740249b485846093f8a66220b25fb86290.tar.xz
linux-c43ce4740249b485846093f8a66220b25fb86290.zip
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>
Diffstat (limited to 'drivers/gpio/gpio-zynq.c')
-rw-r--r--drivers/gpio/gpio-zynq.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 3521c1dc3ac0..bb1ac0c5cf26 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -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");