linux-mips
[Top] [All Lists]

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

To: Geert Uytterhoeven <geert@linux-m68k.org>
Subject: Re: [PATCH 2/2] MIPS: JZ4740: add missing header file to serial.h
From: Ralf Baechle <ralf@linux-mips.org>
Date: Wed, 17 Oct 2012 17:03:19 +0200
Cc: Antony Pavlov <antonynpavlov@gmail.com>, linux-mips@linux-mips.org, Lars-Peter Clausen <lars@metafoo.de>
In-reply-to: <CAMuHMdUf-UBNE+2DxvOo5Cc5+FbzQzvCMBJN2epBesmn0dnoAQ@mail.gmail.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1350337127-11315-1-git-send-email-antonynpavlov@gmail.com> <1350337127-11315-2-git-send-email-antonynpavlov@gmail.com> <CAMuHMdUf-UBNE+2DxvOo5Cc5+FbzQzvCMBJN2epBesmn0dnoAQ@mail.gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
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

<Prev in Thread] Current Thread [Next in Thread>