diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2010-05-26 17:42:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-27 12:12:41 -0400 |
commit | 62154991a8b2b932112d39bf4aeaab37fa7b9a31 (patch) | |
tree | 3a66dee35354f8ffe071aa059024d9ae41d3cdaa /drivers/gpio | |
parent | a80a0bbee49872c296c9ed9d6af0f510fcd825a7 (diff) |
gpiolib: make names array and its values const
gpiolib doesn't need to modify the names and I assume most initializers
use string constants that shouldn't be modified anyhow.
[akpm@linux-foundation.org: fix drivers/gpio/cs5535-gpio.c]
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Kevin Wells <kevin.wells@nxp.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r-- | drivers/gpio/cs5535-gpio.c | 2 | ||||
-rw-r--r-- | drivers/gpio/gpiolib.c | 2 | ||||
-rw-r--r-- | drivers/gpio/pca953x.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/cs5535-gpio.c b/drivers/gpio/cs5535-gpio.c index 0c3c498f2260..f73a1555e49d 100644 --- a/drivers/gpio/cs5535-gpio.c +++ b/drivers/gpio/cs5535-gpio.c | |||
@@ -197,7 +197,7 @@ static int chip_direction_output(struct gpio_chip *c, unsigned offset, int val) | |||
197 | return 0; | 197 | return 0; |
198 | } | 198 | } |
199 | 199 | ||
200 | static char *cs5535_gpio_names[] = { | 200 | static const char * const cs5535_gpio_names[] = { |
201 | "GPIO0", "GPIO1", "GPIO2", "GPIO3", | 201 | "GPIO0", "GPIO1", "GPIO2", "GPIO3", |
202 | "GPIO4", "GPIO5", "GPIO6", "GPIO7", | 202 | "GPIO4", "GPIO5", "GPIO6", "GPIO7", |
203 | "GPIO8", "GPIO9", "GPIO10", "GPIO11", | 203 | "GPIO8", "GPIO9", "GPIO10", "GPIO11", |
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index cae1b8c5b08c..ce267ee4b94e 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
@@ -722,7 +722,7 @@ int gpio_export(unsigned gpio, bool direction_may_change) | |||
722 | unsigned long flags; | 722 | unsigned long flags; |
723 | struct gpio_desc *desc; | 723 | struct gpio_desc *desc; |
724 | int status = -EINVAL; | 724 | int status = -EINVAL; |
725 | char *ioname = NULL; | 725 | const char *ioname = NULL; |
726 | 726 | ||
727 | /* can't export until sysfs is available ... */ | 727 | /* can't export until sysfs is available ... */ |
728 | if (!gpio_class.p) { | 728 | if (!gpio_class.p) { |
diff --git a/drivers/gpio/pca953x.c b/drivers/gpio/pca953x.c index f156ab3bb6ed..a2b12aa1f2b9 100644 --- a/drivers/gpio/pca953x.c +++ b/drivers/gpio/pca953x.c | |||
@@ -73,7 +73,7 @@ struct pca953x_chip { | |||
73 | struct i2c_client *client; | 73 | struct i2c_client *client; |
74 | struct pca953x_platform_data *dyn_pdata; | 74 | struct pca953x_platform_data *dyn_pdata; |
75 | struct gpio_chip gpio_chip; | 75 | struct gpio_chip gpio_chip; |
76 | char **names; | 76 | const char *const *names; |
77 | }; | 77 | }; |
78 | 78 | ||
79 | static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val) | 79 | static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val) |