gpio: zynq: add missing module_exit function
diff mbox

Message ID 1434531101-2585-1-git-send-email-yamada.masahiro@socionext.com
State New, archived
Headers show

Commit Message

Masahiro Yamada June 17, 2015, 8:51 a.m. UTC
This driver is tristate, so it should be cleanable.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/gpio/gpio-zynq.c | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Michal Simek June 18, 2015, 11:24 a.m. UTC | #1
On 06/17/2015 10:51 AM, Masahiro Yamada wrote:
> This driver is tristate, so it should be cleanable.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
> 
>  drivers/gpio/gpio-zynq.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
> index 184c4b1..1d38da7 100644
> --- a/drivers/gpio/gpio-zynq.c
> +++ b/drivers/gpio/gpio-zynq.c
> @@ -722,6 +722,12 @@ static int __init zynq_gpio_init(void)
>  }
>  postcore_initcall(zynq_gpio_init);
>  
> +static void __exit zynq_gpio_exit(void)
> +{
> +	platform_driver_unregister(&zynq_gpio_driver);
> +}
> +module_exit(zynq_gpio_exit);
> +
>  MODULE_AUTHOR("Xilinx Inc.");
>  MODULE_DESCRIPTION("Zynq GPIO driver");
>  MODULE_LICENSE("GPL");
> 

Looks reasonable to me.

Tested-by: Michal Simek <michal.simek@xilinx.com>

Thanks,
Michal
Linus Walleij July 14, 2015, 1:38 p.m. UTC | #2
On Wed, Jun 17, 2015 at 10:51 AM, Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:

> This driver is tristate, so it should be cleanable.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Patch applied with Michal's test tag.

Yours,
Linus Walleij

Patch
diff mbox

diff --git a/drivers/gpio/gpio-zynq.c b/drivers/gpio/gpio-zynq.c
index 184c4b1..1d38da7 100644
--- a/drivers/gpio/gpio-zynq.c
+++ b/drivers/gpio/gpio-zynq.c
@@ -722,6 +722,12 @@  static int __init zynq_gpio_init(void)
 }
 postcore_initcall(zynq_gpio_init);
 
+static void __exit zynq_gpio_exit(void)
+{
+	platform_driver_unregister(&zynq_gpio_driver);
+}
+module_exit(zynq_gpio_exit);
+
 MODULE_AUTHOR("Xilinx Inc.");
 MODULE_DESCRIPTION("Zynq GPIO driver");
 MODULE_LICENSE("GPL");