[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1410359769.646202267@f334.i.mail.ru>
Date: Wed, 10 Sep 2014 18:36:09 +0400
From: Alexander Shiyan <shc_work@...l.ru>
To: Tobias Klauser <tklauser@...tanz.ch>
Cc: Jim Davis <jim.epost@...il.com>,
Stephen Rothwell <sfr@...b.auug.org.au>,
linux-next <linux-next@...r.kernel.org>,
linux-kernel <linux-kernel@...r.kernel.org>,
jslaby@...e.cz, linux-serial@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH] tty: serial: serial_mctrl_gpio: Fix build error for !GPIOLIB
Wed, 10 Sep 2014 16:16:21 +0200 от Tobias Klauser <tklauser@...tanz.ch>:
> On 2014-09-10 at 15:57:16 +0200, Greg Kroah-Hartman <gregkh@...uxfoundation.org> wrote:
> > On Wed, Sep 10, 2014 at 10:06:58AM +0200, Tobias Klauser wrote:
> > > If SERIAL_MCTRL_GPIO is selected but GPIOLIB is not, the noop functions
> > > from serial_mctrl_gpio.h are pulled in. However, serial_mctrl_gpio.c is
> > > still compiled, leading to function redefinition build errors. Since all
> > > drivers that include serial_mctrl_gpio.h also depend on
> > > SERIAL_MCTRL_GPIO, let it depend on GPIOLIB as well remove the noop
> > > functions alltogether.
> > >
> > > Reported-by: Jim Davis <jim.epost@...il.com>
> > > Signed-off-by: Tobias Klauser <tklauser@...tanz.ch>
> > > ---
> > > drivers/tty/serial/Kconfig | 1 +
> > > drivers/tty/serial/serial_mctrl_gpio.h | 35 ----------------------------------
> > > 2 files changed, 1 insertion(+), 35 deletions(-)
> >
> > I fixed this yesterday with commit below from Alexander, which does
> > things a bit differently than you. Any objections to it?
>
> This is nicer in terms of being able to compile the driver without
> GPIOLIB. However, it wont fix it for the other user of
> SERIAL_MCTRL_GPIO, namely SERIAL_ATMEL. And for any future users of
> SERIAL_MCTRL_GPIO, we need to make sure to use the same select
> directive. To fix it for atmel_serial, I'd suggest the patch below.
Atmel serial driver is already protected by ARCH_REQUIRE_GPIOLIB
in the architecture configuration. The error is happen only for COMPILE_TEST,
but for Atmel driver this option is disabled.
---
Powered by blists - more mailing lists