Re: [PATCH] tty: serial: serial_mctrl_gpio: Fix build error for !GPIOLIB

From: Greg Kroah-Hartman
Date: Wed Sep 10 2014 - 09:58:11 EST


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@xxxxxxxxx>
> Signed-off-by: Tobias Klauser <tklauser@xxxxxxxxxx>
> ---
> 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?

thanks,

greg k-h