Skip to contentSkip to conversation

MIPS: JZ4740: fix '#include guard' in serial.h

PATCH Applied Antony Pavlov 3 participants 5 messages Oct 15, 2012 – Oct 17, 2012 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 MIPS: JZ4740: fix '#include guard' in serial.h

---
 arch/mips/jz4740/serial.h |    1 +
 1 file changed, 1 insertion(+)
arch/mips/jz4740/serial.h +1 -0
index b9fe3ad..aa5a939 100644
@@ -14,6 +14,7 @@
  */
 
 #ifndef __MIPS_JZ4740_SERIAL_H__
+#define __MIPS_JZ4740_SERIAL_H__
 
 void jz4740_serial_out(struct uart_port *p, int offset, int value);
 
Signature · 1 line
1.7.10.4
#1 lore raw

PATCH 2/2 MIPS: JZ4740: add missing header file to serial.h

The 'uart_port' struct is used in the declaration of the jz4740_serial_out() function.
This commit adds the missing header file containing declaration of the 'uart_port' struct.

---
 arch/mips/jz4740/serial.h |    2 ++
 1 file changed, 2 insertions(+)
arch/mips/jz4740/serial.h +2 -0
index aa5a939..dfc155c 100644
@@ -16,6 +16,8 @@
 #ifndef __MIPS_JZ4740_SERIAL_H__
 #define __MIPS_JZ4740_SERIAL_H__
 
+#include <linux/serial_core.h>
+
 void jz4740_serial_out(struct uart_port *p, int offset, int value);
 
 #endif
Signature · 1 line
1.7.10.4
#2 lore raw

Re: [PATCH 2/2] MIPS: JZ4740: add missing header file to serial.h

Quoted 2 lines · Antony Pavlov

The 'uart_port' struct is used in the declaration of the jz4740_serial_out() function.

It only needs a forward declaration, as it just references the pointer type.

Quoted 13 lines

This commit adds the missing header file containing declaration of the 'uart_port' struct.

---
 arch/mips/jz4740/serial.h |    2 ++
 1 file changed, 2 insertions(+)
arch/mips/jz4740/serial.h +0 -0
index aa5a939..dfc155c 100644

arch/mips/jz4740/serial.h line 20

Quoted 5 lines
arch/mips/jz4740/serial.h +2 -0
@@ -16,6 +16,8 @@
 #ifndef __MIPS_JZ4740_SERIAL_H__
 #define __MIPS_JZ4740_SERIAL_H__
 
+#include <linux/serial_core.h>
+

I.e. you can just use instead:

    struct uart_port;

arch/mips/jz4740/serial.h line 23

Quoted 3 lines
arch/mips/jz4740/serial.h +0 -0
 void jz4740_serial_out(struct uart_port *p, int offset, int value);
 
 #endif

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#3 lore raw

Re: [PATCH 2/2] MIPS: JZ4740: add missing header file to serial.h

In reply to Geert Uytterhoeven
Quoted 22 lines · Geert Uytterhoeven
Quoted 2 lines · Antony Pavlov

The 'uart_port' struct is used in the declaration of the jz4740_serial_out() function.

It only needs a forward declaration, as it just references the pointer type.

Quoted 16 lines

This commit adds the missing header file containing declaration of the 'uart_port' struct.

---
 arch/mips/jz4740/serial.h |    2 ++
 1 file changed, 2 insertions(+)
arch/mips/jz4740/serial.h +0 -0
index aa5a939..dfc155c 100644
@@ -16,6 +16,8 @@
 #ifndef __MIPS_JZ4740_SERIAL_H__
 #define __MIPS_JZ4740_SERIAL_H__
 
Quoted 10 lines

arch/mips/jz4740/serial.h line 20

Quoted 2 lines
arch/mips/jz4740/serial.h +2 -0
+#include <linux/serial_core.h>
+

I.e. you can just use instead:

    struct uart_port;
Quoted 3 lines
arch/mips/jz4740/serial.h +0 -0
 void jz4740_serial_out(struct uart_port *p, int offset, int value);
 
 #endif

Serial_core.h drags in eerythign and the kitchen sink so I really prefer the forward declaration.

Ralf