[PATCH] tty: 8250_dw: fix build error for CONFIG_SERIAL_8250=m

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Allow 8250_dw to be built as a module and export serial8250_handle_irq
so that 8250 can still be built as a module.  This prevents the
following build failure:

drivers/built-in.o: In function `dw8250_handle_irq':
8250_dw.c:(.text+0xcad9c): undefined reference to `serial8250_handle_irq'

Reported-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Cc: Greg KH <greg@xxxxxxxxx>
Cc: Arnd Bergmann <arnd@xxxxxxxx>
Signed-off-by: Jamie Iles <jamie@xxxxxxxxxxxxx>
---
 drivers/tty/serial/8250.c    |    1 +
 drivers/tty/serial/8250_dw.c |    5 +++++
 drivers/tty/serial/Kconfig   |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/drivers/tty/serial/8250.c b/drivers/tty/serial/8250.c
index 6f594d2..435ce14 100644
--- a/drivers/tty/serial/8250.c
+++ b/drivers/tty/serial/8250.c
@@ -1588,6 +1588,7 @@ int serial8250_handle_irq(struct uart_port *port, unsigned int iir)
 
 	return 0;
 }
+EXPORT_SYMBOL_GPL(serial8250_handle_irq);
 
 static int serial8250_default_handle_irq(struct uart_port *port)
 {
diff --git a/drivers/tty/serial/8250_dw.c b/drivers/tty/serial/8250_dw.c
index e25782a..844d3a8 100644
--- a/drivers/tty/serial/8250_dw.c
+++ b/drivers/tty/serial/8250_dw.c
@@ -13,6 +13,7 @@
  * raised, the LCR needs to be rewritten and the uart status register read.
  */
 #include <linux/io.h>
+#include <linux/module.h>
 #include <linux/serial_8250.h>
 #include <linux/serial_core.h>
 #include <linux/serial_reg.h>
@@ -97,3 +98,7 @@ int serial8250_use_designware_io(struct uart_port *up)
 
 	return 0;
 }
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Jamie Iles");
+MODULE_DESCRIPTION("Synopsys DesignWare 8250 UART support");
diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
index d2d1cc2..1002e2e 100644
--- a/drivers/tty/serial/Kconfig
+++ b/drivers/tty/serial/Kconfig
@@ -268,7 +268,7 @@ config SERIAL_8250_RM9K
 	  If unsure, say N.
 
 config SERIAL_8250_DW
-	bool "Support for Synopsys DesignWare 8250 quirks"
+	tristate "Support for Synopsys DesignWare 8250 quirks"
 	depends on SERIAL_8250
 	help
 	  Selecting this option will enable handling of the extra features
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux