Skip to contentSkip to conversation

serial: mctrl_gpio: export mctrl_gpio_disable_ms and mctrl_gpio_init

PATCH In review Daniel Wagner 2 participants 6 messages Apr 30, 2018 – May 1, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover serial: mctrl_gpio: export mctrl_gpio_disable_ms and mctrl_gpio_init

Hi Greg,

These two patches should probably be part of the 4.4 because ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling") backport. 4.9, 4.14 and 4.16 have these patches already in it.

Romain Izard (1):
serial: mctrl_gpio: Add missing module license

Uwe Kleine-König (1):
serial: mctrl_gpio: export mctrl_gpio_disable_ms and mctrl_gpio_init

 drivers/tty/serial/serial_mctrl_gpio.c | 5 +++++
 1 file changed, 5 insertions(+)
Signature · 1 line
2.14.3
#1 lore raw

PATCH 1/2 serial: mctrl_gpio: export mctrl_gpio_disable_ms and mctrl_gpio_init

From: Uwe Kleine-König <[email protected]>

To be able to make use of the mctrl-gpio helper from a module these functions must be exported. This was forgotten in the commit introducing support interrupt handling for these functions (while it was done for mctrl_gpio_enable_ms, *sigh*).

Fixes ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling")
---
 drivers/tty/serial/serial_mctrl_gpio.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/tty/serial/serial_mctrl_gpio.c +2 -0
index 3eb57eb532f1..226ad23b136c 100644
@@ -193,6 +193,7 @@ struct mctrl_gpios *mctrl_gpio_init(struct uart_port *port, unsigned int idx)
 
 	return gpios;
 }
+EXPORT_SYMBOL_GPL(mctrl_gpio_init);
 
 void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios)
 {
@@ -247,3 +248,4 @@ void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
 		disable_irq(gpios->irq[i]);
 	}
 }
+EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms);
Signature · 1 line
2.14.3
#2 lore raw

PATCH 2/2 serial: mctrl_gpio: Add missing module license

In reply to Daniel Wagner

From: Romain Izard <[email protected]>

As the mctrl_gpio driver can be built as a module, it needs to have its license specified with MODULE_LICENSE. Otherwise, it cannot access required symbols exported through EXPORT_SYMBOL_GPL.

---
 drivers/tty/serial/serial_mctrl_gpio.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/tty/serial/serial_mctrl_gpio.c +3 -0
index 226ad23b136c..02147361eaa9 100644
@@ -20,6 +20,7 @@
 #include <linux/gpio/consumer.h>
 #include <linux/termios.h>
 #include <linux/serial_core.h>
+#include <linux/module.h>
 
 #include "serial_mctrl_gpio.h"
 
@@ -249,3 +250,5 @@ void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
 	}
 }
 EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms);
+
+MODULE_LICENSE("GPL");
Signature · 1 line
2.14.3
#3 lore raw
In reply to Daniel Wagner
Quoted 6 lines · Daniel Wagner

Hi Greg,

These two patches should probably be part of the 4.4 because ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling") backport. 4.9, 4.14 and 4.16 have these patches already in it.

Quoted 8 lines

Romain Izard (1):
serial: mctrl_gpio: Add missing module license

Uwe Kleine-K�nig (1):
serial: mctrl_gpio: export mctrl_gpio_disable_ms and mctrl_gpio_init

 drivers/tty/serial/serial_mctrl_gpio.c | 5 +++++
 1 file changed, 5 insertions(+)

What are the git commit ids of these patches in Linus's tree? It's a pain for me to have to dig them out...

#4 lore raw
Quoted 10 lines · Greg KH
Quoted 9 lines · Daniel Wagner

Hi Greg,

These two patches should probably be part of the 4.4 because ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling") backport. 4.9, 4.14 and 4.16 have these patches already in it.

Romain Izard (1):
serial: mctrl_gpio: Add missing module license

Quoted 8 lines
Quoted 5 lines

Uwe Kleine-K�nig (1):
serial: mctrl_gpio: export mctrl_gpio_disable_ms and mctrl_gpio_init

 drivers/tty/serial/serial_mctrl_gpio.c | 5 +++++
 1 file changed, 5 insertions(+)

What are the git commit ids of these patches in Linus's tree? It's a pain for me to have to dig them out...

Nevermind, I found them...

#5 lore raw
In reply to Greg KH
Quoted 2 lines

What are the git commit ids of these patches in Linus's tree? It's a pain for me to have to dig them out...

Sorry about that. I'll do better next time.