Re: [PATCH v7 1/2] serial: sc16is7xx

From: Jon Ringle
Date: Fri Apr 25 2014 - 14:24:33 EST


On Fri, Apr 25, 2014 at 1:40 PM, Alexander Shiyan <shc_work@xxxxxxx> wrote:
> Fri, 25 Apr 2014 10:26:40 -0700 ÐÑ Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx>:
>> On Thu, Apr 24, 2014 at 08:56:06PM -0400, jon@xxxxxxxxxx wrote:
>> > From: Jon Ringle <jringle@xxxxxxxxxxxxx>
>> >
>> > The SC16IS7xx is a slave I2C-bus/SPI interface to a single-channel
>> > high performance UART. The SC16IS7xx's internal register set is
>> > backward-compatible with the widely used and widely popular 16C450.
>> >
>> > The SC16IS7xx also provides additional advanced features such as
>> > auto hardware and software flow control, automatic RS-485 support, and
>> > software reset.
>> >
>> > Signed-off-by: Jon Ringle <jringle@xxxxxxxxxxxxx>
>> > ---
>> > drivers/tty/serial/Kconfig | 9 +
>> > drivers/tty/serial/Makefile | 1 +
>> > drivers/tty/serial/sc16is7xx.c | 1279 ++++++++++++++++++++++++++++++++++++++
>> > include/uapi/linux/serial_core.h | 3 +
>> > 4 files changed, 1292 insertions(+)
>> > create mode 100644 drivers/tty/serial/sc16is7xx.c
>>
>> I get a few build warnings with this patch applied:
>>
>> drivers/tty/serial/sc16is7xx.c:1059:12: warning: âsc16is7xx_probeâ defined but not used [-Wunused-function]
>> static int sc16is7xx_probe(struct device *dev,
>> ^
>> drivers/tty/serial/sc16is7xx.c:1175:12: warning: âsc16is7xx_removeâ defined but not used [-Wunused-function]
>> static int sc16is7xx_remove(struct device *dev)
>> ^
>> drivers/tty/serial/sc16is7xx.c:1214:29: warning: âregcfgâ defined but not used [-Wunused-variable]
>> static struct regmap_config regcfg = {
>> ^
>>
>> Can you send a follow-on patch to fix them?
>
> Seems this just should contain: "depends on I2C" in the Kconfig.

I can add "depends on I2C" in Kconfig for now, but I'm just wondering
how would this be dealt with when sometime in the future this driver
supports either I2C or SPI? Can the "depends on" be conditional
somehow?

Jon
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/