serial: sc16is7xx: compile I2C when REGMAP_I2C is module
commit3df5adb23f115a5d2c7ca10fc66a5b9176cedc49
authorJan Moskyto Matejka <mq@suse.cz>
Fri, 2 May 2014 12:02:25 +0000 (2 14:02 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 May 2014 19:22:42 +0000 (28 12:22 -0700)
treed1e624c6a63f0430e222eccb561d6f5d6d093972
parent361746264b5e875e9b3c6f5b844accfe629e28bb
serial: sc16is7xx: compile I2C when REGMAP_I2C is module

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 removing the `#ifdef CONFIG_REGMAP_I2C' around their
calls as this driver selects REGMAP_I2C in Kconfig. This part of driver just
didn't compile at all when REGMAP_I2C configured as module (CONFIG_REGMAP_I2C
is not defined, just CONFIG_REGMAP_I2C_MODULE).

Signed-off-by: Jan Moskyto Matejka <mq@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sc16is7xx.c