Wed, 30 Apr 2014 15:07:04 +0200 от Jan Moskyto Matejka <mq@xxxxxxx>: > drivers/tty/serial/sc16is7xx.c:1060:12: warning: 'sc16is7xx_probe' defined but not used [-Wunused-function] > static int sc16is7xx_probe(struct device *dev, > ^ > drivers/tty/serial/sc16is7xx.c:1176:12: warning: 'sc16is7xx_remove' defined but not used [-Wunused-function] > static int sc16is7xx_remove(struct device *dev) > ^ > drivers/tty/serial/sc16is7xx.c:1215:29: warning: 'regcfg' defined but not used [-Wunused-variable] > static struct regmap_config regcfg = { > ^ > > Fixed these warnings by #ifdef-ing them to CONFIG_REGMAP_I2C and > recursively #ifdef-ing also some other functions that got defined but not used. > > Signed-off-by: Jan Moskyto Matejka <mq@xxxxxxx> > --- > drivers/tty/serial/sc16is7xx.c | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c > index 7206a64..bd76277 100644 > --- a/drivers/tty/serial/sc16is7xx.c > +++ b/drivers/tty/serial/sc16is7xx.c > @@ -389,6 +389,7 @@ static const struct sc16is7xx_devtype sc16is762_devtype = { > .nr_uart = 2, > }; > > +#ifdef CONFIG_REGMAP_I2C > static bool sc16is7xx_regmap_volatile(struct device *dev, unsigned int reg) No. This is not a good way. The Kconfig should be patched for dependency of I2C. --- ��.n��������+%������w��{.n�����{��ǫ����{ay�ʇڙ���f���h������_�(�階�ݢj"��������G����?���&��