Re: [PATCH tty] sc16is7xx: fix Kconfig dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 6 Jul 2015 14:20:57 +0530, Rama Kiran Kumar Indrakanti wrote:
> > From: Jakub Kicinski 
> > 
> > When I2C=m and SPI=y or-ing them will produce =y while
> > what we need is the lower bound, i.e. =m.  Fortunately
> > SPI is a boolean so we need to handle only one special
> > case.
> > 
> > Reported-by: kbuild test robot 
> > Signed-off-by: Jakub Kicinski 
> > ---
> >  drivers/tty/serial/Kconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/drivers/tty/serial/Kconfig b/drivers/tty/serial/Kconfig
> > index a74dabc8f108..138fe7fe8e0b 100644
> > --- a/drivers/tty/serial/Kconfig
> > +++ b/drivers/tty/serial/Kconfig
> > @@ -1185,7 +1185,7 @@ config SERIAL_SC16IS7XX_CORE
> >  config SERIAL_SC16IS7XX
> >          tristate "SC16IS7xx serial support"
> >          select SERIAL_CORE
> > -        depends on I2C || SPI_MASTER
> > +        depends on (SPI_MASTER && !I2C) || I2C  
> 
> Does this change make the I2C and SPI available in a single configuration.
> As in a system we can have one chip with I2C and another with SPI?

SPI and I2C is already available in a single configuration.  The
problem is we allow the driver to be built-in whenever either of 
SPI || I2C is built-in which causes problems when I2C is built as
a module.  I restrict the driver to ignore SPI setting if I2C is
also selected.

Theoretically this solution is a bit too conservative because user may
choose only SPI version of the driver while he has I2C=m in his system,
but that's a rare case and I prefer to keep the Kconfig simple.
--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux