Skip to contentSkip to conversation

pinctrl: baytrail: add missing module removal support

PATCH In review Felipe Balbi 2 participants 2 messages Oct 13, 2014 Pin control

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pinctrl: baytrail: add missing module removal support

pinctrl-baytrail driver provides a proper ->remove() method on its platform_driver definition, however there's no way, currently, to unload the driver due to missing module_exit(). This patch adds module_exit().

---
 drivers/pinctrl/pinctrl-baytrail.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pinctrl/pinctrl-baytrail.c +6 -1
index e12e5b0..3ece001 100644
@@ -612,5 +612,10 @@ static int __init byt_gpio_init(void)
 {
 	return platform_driver_register(&byt_gpio_driver);
 }
-
 subsys_initcall(byt_gpio_init);
+
+static void __exit byt_gpio_exit(void)
+{
+	platform_driver_unregister(&byt_gpio_driver);
+}
+module_exit(byt_gpio_exit);
Signature · 1 line
2.1.0.GIT
Acked-by on v1 1/1
#1 lore raw

Hi Linus,

Quoted 6 lines · Felipe Balbi

pinctrl-baytrail driver provides a proper ->remove() method on its platform_driver definition, however there's no way, currently, to unload the driver due to missing module_exit(). This patch adds module_exit().

This is a quite trivial patch, so not sure you need an Ack from somebody that has the actual hw. In case you do:

Quoted 23 lines
---
 drivers/pinctrl/pinctrl-baytrail.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/pinctrl/pinctrl-baytrail.c +6 -1
index e12e5b0..3ece001 100644
@@ -612,5 +612,10 @@ static int __init byt_gpio_init(void)
 {
 	return platform_driver_register(&byt_gpio_driver);
 }
-
 subsys_initcall(byt_gpio_init);
+
+static void __exit byt_gpio_exit(void)
+{
+	platform_driver_unregister(&byt_gpio_driver);
+}
+module_exit(byt_gpio_exit);
Signature · 1 line
2.1.0.GIT