On Tue, Oct 16, 2012 at 10:19:33AM +0200, Geert Uytterhoeven wrote:
> On Mon, Oct 15, 2012 at 11:38 PM, Antony Pavlov <antonynpavlov@gmail.com>
> wrote:
> > 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.
>
> > This commit adds the missing header file containing
> > declaration of the 'uart_port' struct.
> >
> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > ---
> > arch/mips/jz4740/serial.h | 2 ++
> > 1 file changed, 2 insertions(+)
> >
> > diff --git a/arch/mips/jz4740/serial.h b/arch/mips/jz4740/serial.h
> > index aa5a939..dfc155c 100644
> > --- a/arch/mips/jz4740/serial.h
> > +++ b/arch/mips/jz4740/serial.h
> > @@ -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;
>
> > 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
|