Skip to contentSkip to conversation

serial: mctrl_gpio: Add missing module license

PATCH In review Romain Izard 3 participants 4 messages Feb 23, 2016 – Feb 29, 2016 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

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

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.5.0
#1 lore raw
Quoted 22 lines · Romain Izard

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 +1 -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"
 

drivers/tty/serial/serial_mctrl_gpio.c void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios) · line 254

Quoted 5 lines
drivers/tty/serial/serial_mctrl_gpio.c +2 -0
@@ -249,3 +250,5 @@ void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
        }
 }
 EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms);
+
+MODULE_LICENSE("GPL");

Shouldn't it be "GPL v2" instead to match the licensing text in the top of the file?

#2 lore raw

2016-02-23 16:21 GMT+01:00 Fabio Estevam <[email protected]>:

Quoted 23 lines
Quoted 21 lines · Romain Izard

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 +1 -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"
 
Quoted 9 lines

drivers/tty/serial/serial_mctrl_gpio.c void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios) · line 254

Quoted 6 lines
drivers/tty/serial/serial_mctrl_gpio.c +2 -0
@@ -249,3 +250,5 @@ void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
        }
 }
 EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms);
+
+MODULE_LICENSE("GPL");

Shouldn't it be "GPL v2" instead to match the licensing text in the top of the file?

According to include/linux/module.h, "GPL" means "GNU Public License v2 or later",
which is the license text in the file header.

Signature · 1 line
Romain Izard
Acked-by on v1 1/1
#3 lore raw
In reply to Romain Izard

Hello Romain,

Quoted 22 lines · Romain Izard

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 +1 -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"
 

drivers/tty/serial/serial_mctrl_gpio.c void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios) · line 254

Quoted 5 lines
drivers/tty/serial/serial_mctrl_gpio.c +2 -0
@@ -249,3 +250,5 @@ void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
 	}
 }
 EXPORT_SYMBOL_GPL(mctrl_gpio_disable_ms);
+
+MODULE_LICENSE("GPL");
Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |