[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1399032145-1055-1-git-send-email-mq@suse.cz>
Date: Fri, 2 May 2014 14:02:25 +0200
From: Jan Moskyto Matejka <mq@...e.cz>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.cz>, linux-serial@...r.kernel.org,
linux-kernel@...r.kernel.org, Alexander Shiyan <shc_work@...l.ru>
Cc: Jan Moskyto Matejka <mq@...e.cz>
Subject: [PATCH] [linux-next] 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@...e.cz>
---
drivers/tty/serial/sc16is7xx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 7206a64..80b0ca6 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -1221,7 +1221,6 @@ static struct regmap_config regcfg = {
.precious_reg = sc16is7xx_regmap_precious,
};
-#ifdef CONFIG_REGMAP_I2C
static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
const struct i2c_device_id *id)
{
@@ -1273,7 +1272,6 @@ static struct i2c_driver sc16is7xx_i2c_uart_driver = {
};
module_i2c_driver(sc16is7xx_i2c_uart_driver);
MODULE_ALIAS("i2c:sc16is7xx");
-#endif
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Jon Ringle <jringle@...dpoint.com>");
--
1.8.4.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists