aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Kicinski <kubakici@wp.pl>2015-07-31 08:44:24 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-05 01:07:27 -0400
commit68be64ca7e2adc4f16077c3b0feb8719f89119bd (patch)
tree3a7bb3c83652a4e2eab251733541afbddcfd324c
parentc64349722d141712d8500b5ad377d3117be46ba8 (diff)
sc16is7xx: constify devtype
devtype structures are all declared as const. Compiler does not complain because we cast their pointers to save them in .driver_data. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/sc16is7xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tty/serial/sc16is7xx.c b/drivers/tty/serial/sc16is7xx.c
index 15610cb1f295..72ffd0dcab78 100644
--- a/drivers/tty/serial/sc16is7xx.c
+++ b/drivers/tty/serial/sc16is7xx.c
@@ -322,7 +322,7 @@ struct sc16is7xx_one {
322}; 322};
323 323
324struct sc16is7xx_port { 324struct sc16is7xx_port {
325 struct sc16is7xx_devtype *devtype; 325 const struct sc16is7xx_devtype *devtype;
326 struct regmap *regmap; 326 struct regmap *regmap;
327 struct clk *clk; 327 struct clk *clk;
328#ifdef CONFIG_GPIOLIB 328#ifdef CONFIG_GPIOLIB
@@ -1131,7 +1131,7 @@ static int sc16is7xx_gpio_direction_output(struct gpio_chip *chip,
1131#endif 1131#endif
1132 1132
1133static int sc16is7xx_probe(struct device *dev, 1133static int sc16is7xx_probe(struct device *dev,
1134 struct sc16is7xx_devtype *devtype, 1134 const struct sc16is7xx_devtype *devtype,
1135 struct regmap *regmap, int irq, unsigned long flags) 1135 struct regmap *regmap, int irq, unsigned long flags)
1136{ 1136{
1137 struct sched_param sched_param = { .sched_priority = MAX_RT_PRIO / 2 }; 1137 struct sched_param sched_param = { .sched_priority = MAX_RT_PRIO / 2 };
@@ -1303,7 +1303,7 @@ static struct regmap_config regcfg = {
1303#ifdef CONFIG_SERIAL_SC16IS7XX_SPI 1303#ifdef CONFIG_SERIAL_SC16IS7XX_SPI
1304static int sc16is7xx_spi_probe(struct spi_device *spi) 1304static int sc16is7xx_spi_probe(struct spi_device *spi)
1305{ 1305{
1306 struct sc16is7xx_devtype *devtype; 1306 const struct sc16is7xx_devtype *devtype;
1307 unsigned long flags = 0; 1307 unsigned long flags = 0;
1308 struct regmap *regmap; 1308 struct regmap *regmap;
1309 int ret; 1309 int ret;
@@ -1372,7 +1372,7 @@ MODULE_ALIAS("spi:sc16is7xx");
1372static int sc16is7xx_i2c_probe(struct i2c_client *i2c, 1372static int sc16is7xx_i2c_probe(struct i2c_client *i2c,
1373 const struct i2c_device_id *id) 1373 const struct i2c_device_id *id)
1374{ 1374{
1375 struct sc16is7xx_devtype *devtype; 1375 const struct sc16is7xx_devtype *devtype;
1376 unsigned long flags = 0; 1376 unsigned long flags = 0;
1377 struct regmap *regmap; 1377 struct regmap *regmap;
1378 1378