mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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. [[email protected]: fix drivers/gpio/cs5535-gpio.c] Signed-off-by: Uwe Kleine-König <[email protected]> Cc: Kevin Wells <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a80a0bbee4
commit
62154991a8
5 changed files with 5 additions and 5 deletions
|
|
@ -197,7 +197,7 @@ static int chip_direction_output(struct gpio_chip *c, unsigned offset, int val)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char *cs5535_gpio_names[] = {
|
||||
static const char * const cs5535_gpio_names[] = {
|
||||
"GPIO0", "GPIO1", "GPIO2", "GPIO3",
|
||||
"GPIO4", "GPIO5", "GPIO6", "GPIO7",
|
||||
"GPIO8", "GPIO9", "GPIO10", "GPIO11",
|
||||
|
|
|
|||
|
|
@ -722,7 +722,7 @@ int gpio_export(unsigned gpio, bool direction_may_change)
|
|||
unsigned long flags;
|
||||
struct gpio_desc *desc;
|
||||
int status = -EINVAL;
|
||||
char *ioname = NULL;
|
||||
const char *ioname = NULL;
|
||||
|
||||
/* can't export until sysfs is available ... */
|
||||
if (!gpio_class.p) {
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ struct pca953x_chip {
|
|||
struct i2c_client *client;
|
||||
struct pca953x_platform_data *dyn_pdata;
|
||||
struct gpio_chip gpio_chip;
|
||||
char **names;
|
||||
const char *const *names;
|
||||
};
|
||||
|
||||
static int pca953x_write_reg(struct pca953x_chip *chip, int reg, uint16_t val)
|
||||
|
|
|
|||
Loading…
Reference in a new issue