Commit 3f713b7c authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Linus Walleij

pinctrl: move const qualifier before struct

Update subsystem wide for consistency.
Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent e84621bd
...@@ -206,8 +206,8 @@ static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl, ...@@ -206,8 +206,8 @@ static int berlin_pinctrl_add_function(struct berlin_pinctrl *pctrl,
static int berlin_pinctrl_build_state(struct platform_device *pdev) static int berlin_pinctrl_build_state(struct platform_device *pdev)
{ {
struct berlin_pinctrl *pctrl = platform_get_drvdata(pdev); struct berlin_pinctrl *pctrl = platform_get_drvdata(pdev);
struct berlin_desc_group const *desc_group; const struct berlin_desc_group *desc_group;
struct berlin_desc_function const *desc_function; const struct berlin_desc_function *desc_function;
int i, max_functions = 0; int i, max_functions = 0;
pctrl->nfunctions = 0; pctrl->nfunctions = 0;
......
...@@ -264,7 +264,7 @@ static int pinctrl_register_one_pin(struct pinctrl_dev *pctldev, ...@@ -264,7 +264,7 @@ static int pinctrl_register_one_pin(struct pinctrl_dev *pctldev,
} }
static int pinctrl_register_pins(struct pinctrl_dev *pctldev, static int pinctrl_register_pins(struct pinctrl_dev *pctldev,
struct pinctrl_pin_desc const *pins, const struct pinctrl_pin_desc *pins,
unsigned num_descs) unsigned num_descs)
{ {
unsigned i; unsigned i;
...@@ -907,7 +907,7 @@ static struct pinctrl_state *create_state(struct pinctrl *p, ...@@ -907,7 +907,7 @@ static struct pinctrl_state *create_state(struct pinctrl *p,
} }
static int add_setting(struct pinctrl *p, struct pinctrl_dev *pctldev, static int add_setting(struct pinctrl *p, struct pinctrl_dev *pctldev,
struct pinctrl_map const *map) const struct pinctrl_map *map)
{ {
struct pinctrl_state *state; struct pinctrl_state *state;
struct pinctrl_setting *setting; struct pinctrl_setting *setting;
...@@ -995,7 +995,7 @@ static struct pinctrl *create_pinctrl(struct device *dev, ...@@ -995,7 +995,7 @@ static struct pinctrl *create_pinctrl(struct device *dev,
const char *devname; const char *devname;
struct pinctrl_maps *maps_node; struct pinctrl_maps *maps_node;
int i; int i;
struct pinctrl_map const *map; const struct pinctrl_map *map;
int ret; int ret;
/* /*
...@@ -1321,7 +1321,7 @@ void devm_pinctrl_put(struct pinctrl *p) ...@@ -1321,7 +1321,7 @@ void devm_pinctrl_put(struct pinctrl *p)
} }
EXPORT_SYMBOL_GPL(devm_pinctrl_put); EXPORT_SYMBOL_GPL(devm_pinctrl_put);
int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, int pinctrl_register_map(const struct pinctrl_map *maps, unsigned num_maps,
bool dup) bool dup)
{ {
int i, ret; int i, ret;
...@@ -1402,13 +1402,13 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, ...@@ -1402,13 +1402,13 @@ int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps,
* function will perform a shallow copy for the mapping entries. * function will perform a shallow copy for the mapping entries.
* @num_maps: the number of maps in the mapping table * @num_maps: the number of maps in the mapping table
*/ */
int pinctrl_register_mappings(struct pinctrl_map const *maps, int pinctrl_register_mappings(const struct pinctrl_map *maps,
unsigned num_maps) unsigned num_maps)
{ {
return pinctrl_register_map(maps, num_maps, true); return pinctrl_register_map(maps, num_maps, true);
} }
void pinctrl_unregister_map(struct pinctrl_map const *map) void pinctrl_unregister_map(const struct pinctrl_map *map)
{ {
struct pinctrl_maps *maps_node; struct pinctrl_maps *maps_node;
...@@ -1702,7 +1702,7 @@ static int pinctrl_maps_show(struct seq_file *s, void *what) ...@@ -1702,7 +1702,7 @@ static int pinctrl_maps_show(struct seq_file *s, void *what)
{ {
struct pinctrl_maps *maps_node; struct pinctrl_maps *maps_node;
int i; int i;
struct pinctrl_map const *map; const struct pinctrl_map *map;
seq_puts(s, "Pinctrl maps:\n"); seq_puts(s, "Pinctrl maps:\n");
......
...@@ -179,7 +179,7 @@ struct pin_desc { ...@@ -179,7 +179,7 @@ struct pin_desc {
*/ */
struct pinctrl_maps { struct pinctrl_maps {
struct list_head node; struct list_head node;
struct pinctrl_map const *maps; const struct pinctrl_map *maps;
unsigned num_maps; unsigned num_maps;
}; };
...@@ -243,9 +243,9 @@ extern struct pinctrl_gpio_range * ...@@ -243,9 +243,9 @@ extern struct pinctrl_gpio_range *
pinctrl_find_gpio_range_from_pin_nolock(struct pinctrl_dev *pctldev, pinctrl_find_gpio_range_from_pin_nolock(struct pinctrl_dev *pctldev,
unsigned int pin); unsigned int pin);
int pinctrl_register_map(struct pinctrl_map const *maps, unsigned num_maps, int pinctrl_register_map(const struct pinctrl_map *maps, unsigned num_maps,
bool dup); bool dup);
void pinctrl_unregister_map(struct pinctrl_map const *map); void pinctrl_unregister_map(const struct pinctrl_map *map);
extern int pinctrl_force_sleep(struct pinctrl_dev *pctldev); extern int pinctrl_force_sleep(struct pinctrl_dev *pctldev);
extern int pinctrl_force_default(struct pinctrl_dev *pctldev); extern int pinctrl_force_default(struct pinctrl_dev *pctldev);
......
...@@ -37,7 +37,7 @@ int pinconf_check_ops(struct pinctrl_dev *pctldev) ...@@ -37,7 +37,7 @@ int pinconf_check_ops(struct pinctrl_dev *pctldev)
return 0; return 0;
} }
int pinconf_validate_map(struct pinctrl_map const *map, int i) int pinconf_validate_map(const struct pinctrl_map *map, int i)
{ {
if (!map->data.configs.group_or_pin) { if (!map->data.configs.group_or_pin) {
pr_err("failed to register map %s (%d): no group/pin given\n", pr_err("failed to register map %s (%d): no group/pin given\n",
...@@ -106,7 +106,7 @@ int pin_config_group_get(const char *dev_name, const char *pin_group, ...@@ -106,7 +106,7 @@ int pin_config_group_get(const char *dev_name, const char *pin_group,
return ret; return ret;
} }
int pinconf_map_to_setting(struct pinctrl_map const *map, int pinconf_map_to_setting(const struct pinctrl_map *map,
struct pinctrl_setting *setting) struct pinctrl_setting *setting)
{ {
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
...@@ -143,11 +143,11 @@ int pinconf_map_to_setting(struct pinctrl_map const *map, ...@@ -143,11 +143,11 @@ int pinconf_map_to_setting(struct pinctrl_map const *map,
return 0; return 0;
} }
void pinconf_free_setting(struct pinctrl_setting const *setting) void pinconf_free_setting(const struct pinctrl_setting *setting)
{ {
} }
int pinconf_apply_setting(struct pinctrl_setting const *setting) int pinconf_apply_setting(const struct pinctrl_setting *setting)
{ {
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinconf_ops *ops = pctldev->desc->confops; const struct pinconf_ops *ops = pctldev->desc->confops;
...@@ -235,7 +235,7 @@ static void pinconf_show_config(struct seq_file *s, struct pinctrl_dev *pctldev, ...@@ -235,7 +235,7 @@ static void pinconf_show_config(struct seq_file *s, struct pinctrl_dev *pctldev,
} }
} }
void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map) void pinconf_show_map(struct seq_file *s, const struct pinctrl_map *map)
{ {
struct pinctrl_dev *pctldev; struct pinctrl_dev *pctldev;
...@@ -259,7 +259,7 @@ void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map) ...@@ -259,7 +259,7 @@ void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map)
} }
void pinconf_show_setting(struct seq_file *s, void pinconf_show_setting(struct seq_file *s,
struct pinctrl_setting const *setting) const struct pinctrl_setting *setting)
{ {
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
#ifdef CONFIG_PINCONF #ifdef CONFIG_PINCONF
int pinconf_check_ops(struct pinctrl_dev *pctldev); int pinconf_check_ops(struct pinctrl_dev *pctldev);
int pinconf_validate_map(struct pinctrl_map const *map, int i); int pinconf_validate_map(const struct pinctrl_map *map, int i);
int pinconf_map_to_setting(struct pinctrl_map const *map, int pinconf_map_to_setting(const struct pinctrl_map *map,
struct pinctrl_setting *setting); struct pinctrl_setting *setting);
void pinconf_free_setting(struct pinctrl_setting const *setting); void pinconf_free_setting(const struct pinctrl_setting *setting);
int pinconf_apply_setting(struct pinctrl_setting const *setting); int pinconf_apply_setting(const struct pinctrl_setting *setting);
int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin,
unsigned long *configs, size_t nconfigs); unsigned long *configs, size_t nconfigs);
...@@ -39,22 +39,22 @@ static inline int pinconf_check_ops(struct pinctrl_dev *pctldev) ...@@ -39,22 +39,22 @@ static inline int pinconf_check_ops(struct pinctrl_dev *pctldev)
return 0; return 0;
} }
static inline int pinconf_validate_map(struct pinctrl_map const *map, int i) static inline int pinconf_validate_map(const struct pinctrl_map *map, int i)
{ {
return 0; return 0;
} }
static inline int pinconf_map_to_setting(struct pinctrl_map const *map, static inline int pinconf_map_to_setting(const struct pinctrl_map *map,
struct pinctrl_setting *setting) struct pinctrl_setting *setting)
{ {
return 0; return 0;
} }
static inline void pinconf_free_setting(struct pinctrl_setting const *setting) static inline void pinconf_free_setting(const struct pinctrl_setting *setting)
{ {
} }
static inline int pinconf_apply_setting(struct pinctrl_setting const *setting) static inline int pinconf_apply_setting(const struct pinctrl_setting *setting)
{ {
return 0; return 0;
} }
...@@ -69,21 +69,21 @@ static inline int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin, ...@@ -69,21 +69,21 @@ static inline int pinconf_set_config(struct pinctrl_dev *pctldev, unsigned pin,
#if defined(CONFIG_PINCONF) && defined(CONFIG_DEBUG_FS) #if defined(CONFIG_PINCONF) && defined(CONFIG_DEBUG_FS)
void pinconf_show_map(struct seq_file *s, struct pinctrl_map const *map); void pinconf_show_map(struct seq_file *s, const struct pinctrl_map *map);
void pinconf_show_setting(struct seq_file *s, void pinconf_show_setting(struct seq_file *s,
struct pinctrl_setting const *setting); const struct pinctrl_setting *setting);
void pinconf_init_device_debugfs(struct dentry *devroot, void pinconf_init_device_debugfs(struct dentry *devroot,
struct pinctrl_dev *pctldev); struct pinctrl_dev *pctldev);
#else #else
static inline void pinconf_show_map(struct seq_file *s, static inline void pinconf_show_map(struct seq_file *s,
struct pinctrl_map const *map) const struct pinctrl_map *map)
{ {
} }
static inline void pinconf_show_setting(struct seq_file *s, static inline void pinconf_show_setting(struct seq_file *s,
struct pinctrl_setting const *setting) const struct pinctrl_setting *setting)
{ {
} }
......
...@@ -61,7 +61,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev) ...@@ -61,7 +61,7 @@ int pinmux_check_ops(struct pinctrl_dev *pctldev)
return 0; return 0;
} }
int pinmux_validate_map(struct pinctrl_map const *map, int i) int pinmux_validate_map(const struct pinctrl_map *map, int i)
{ {
if (!map->data.mux.function) { if (!map->data.mux.function) {
pr_err("failed to register map %s (%d): no function given\n", pr_err("failed to register map %s (%d): no function given\n",
...@@ -312,7 +312,7 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev, ...@@ -312,7 +312,7 @@ static int pinmux_func_name_to_selector(struct pinctrl_dev *pctldev,
return -EINVAL; return -EINVAL;
} }
int pinmux_map_to_setting(struct pinctrl_map const *map, int pinmux_map_to_setting(const struct pinctrl_map *map,
struct pinctrl_setting *setting) struct pinctrl_setting *setting)
{ {
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
...@@ -372,12 +372,12 @@ int pinmux_map_to_setting(struct pinctrl_map const *map, ...@@ -372,12 +372,12 @@ int pinmux_map_to_setting(struct pinctrl_map const *map,
return 0; return 0;
} }
void pinmux_free_setting(struct pinctrl_setting const *setting) void pinmux_free_setting(const struct pinctrl_setting *setting)
{ {
/* This function is currently unused */ /* This function is currently unused */
} }
int pinmux_enable_setting(struct pinctrl_setting const *setting) int pinmux_enable_setting(const struct pinctrl_setting *setting)
{ {
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
...@@ -458,7 +458,7 @@ int pinmux_enable_setting(struct pinctrl_setting const *setting) ...@@ -458,7 +458,7 @@ int pinmux_enable_setting(struct pinctrl_setting const *setting)
return ret; return ret;
} }
void pinmux_disable_setting(struct pinctrl_setting const *setting) void pinmux_disable_setting(const struct pinctrl_setting *setting)
{ {
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinctrl_ops *pctlops = pctldev->desc->pctlops; const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
...@@ -627,7 +627,7 @@ static int pinmux_pins_show(struct seq_file *s, void *what) ...@@ -627,7 +627,7 @@ static int pinmux_pins_show(struct seq_file *s, void *what)
return 0; return 0;
} }
void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map) void pinmux_show_map(struct seq_file *s, const struct pinctrl_map *map)
{ {
seq_printf(s, "group %s\nfunction %s\n", seq_printf(s, "group %s\nfunction %s\n",
map->data.mux.group ? map->data.mux.group : "(default)", map->data.mux.group ? map->data.mux.group : "(default)",
...@@ -635,7 +635,7 @@ void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map) ...@@ -635,7 +635,7 @@ void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map)
} }
void pinmux_show_setting(struct seq_file *s, void pinmux_show_setting(struct seq_file *s,
struct pinctrl_setting const *setting) const struct pinctrl_setting *setting)
{ {
struct pinctrl_dev *pctldev = setting->pctldev; struct pinctrl_dev *pctldev = setting->pctldev;
const struct pinmux_ops *pmxops = pctldev->desc->pmxops; const struct pinmux_ops *pmxops = pctldev->desc->pmxops;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
int pinmux_check_ops(struct pinctrl_dev *pctldev); int pinmux_check_ops(struct pinctrl_dev *pctldev);
int pinmux_validate_map(struct pinctrl_map const *map, int i); int pinmux_validate_map(const struct pinctrl_map *map, int i);
int pinmux_request_gpio(struct pinctrl_dev *pctldev, int pinmux_request_gpio(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
...@@ -25,11 +25,11 @@ int pinmux_gpio_direction(struct pinctrl_dev *pctldev, ...@@ -25,11 +25,11 @@ int pinmux_gpio_direction(struct pinctrl_dev *pctldev,
struct pinctrl_gpio_range *range, struct pinctrl_gpio_range *range,
unsigned pin, bool input); unsigned pin, bool input);
int pinmux_map_to_setting(struct pinctrl_map const *map, int pinmux_map_to_setting(const struct pinctrl_map *map,
struct pinctrl_setting *setting); struct pinctrl_setting *setting);
void pinmux_free_setting(struct pinctrl_setting const *setting); void pinmux_free_setting(const struct pinctrl_setting *setting);
int pinmux_enable_setting(struct pinctrl_setting const *setting); int pinmux_enable_setting(const struct pinctrl_setting *setting);
void pinmux_disable_setting(struct pinctrl_setting const *setting); void pinmux_disable_setting(const struct pinctrl_setting *setting);
#else #else
...@@ -38,7 +38,7 @@ static inline int pinmux_check_ops(struct pinctrl_dev *pctldev) ...@@ -38,7 +38,7 @@ static inline int pinmux_check_ops(struct pinctrl_dev *pctldev)
return 0; return 0;
} }
static inline int pinmux_validate_map(struct pinctrl_map const *map, int i) static inline int pinmux_validate_map(const struct pinctrl_map *map, int i)
{ {
return 0; return 0;
} }
...@@ -63,23 +63,22 @@ static inline int pinmux_gpio_direction(struct pinctrl_dev *pctldev, ...@@ -63,23 +63,22 @@ static inline int pinmux_gpio_direction(struct pinctrl_dev *pctldev,
return 0; return 0;
} }
static inline int pinmux_map_to_setting(struct pinctrl_map const *map, static inline int pinmux_map_to_setting(const struct pinctrl_map *map,
struct pinctrl_setting *setting) struct pinctrl_setting *setting)
{ {
return 0; return 0;
} }
static inline void pinmux_free_setting(struct pinctrl_setting const *setting) static inline void pinmux_free_setting(const struct pinctrl_setting *setting)
{ {
} }
static inline int pinmux_enable_setting(struct pinctrl_setting const *setting) static inline int pinmux_enable_setting(const struct pinctrl_setting *setting)
{ {
return 0; return 0;
} }
static inline void pinmux_disable_setting( static inline void pinmux_disable_setting(const struct pinctrl_setting *setting)
struct pinctrl_setting const *setting)
{ {
} }
...@@ -87,21 +86,21 @@ static inline void pinmux_disable_setting( ...@@ -87,21 +86,21 @@ static inline void pinmux_disable_setting(
#if defined(CONFIG_PINMUX) && defined(CONFIG_DEBUG_FS) #if defined(CONFIG_PINMUX) && defined(CONFIG_DEBUG_FS)
void pinmux_show_map(struct seq_file *s, struct pinctrl_map const *map); void pinmux_show_map(struct seq_file *s, const struct pinctrl_map *map);
void pinmux_show_setting(struct seq_file *s, void pinmux_show_setting(struct seq_file *s,
struct pinctrl_setting const *setting); const struct pinctrl_setting *setting);
void pinmux_init_device_debugfs(struct dentry *devroot, void pinmux_init_device_debugfs(struct dentry *devroot,
struct pinctrl_dev *pctldev); struct pinctrl_dev *pctldev);
#else #else
static inline void pinmux_show_map(struct seq_file *s, static inline void pinmux_show_map(struct seq_file *s,
struct pinctrl_map const *map) const struct pinctrl_map *map)
{ {
} }
static inline void pinmux_show_setting(struct seq_file *s, static inline void pinmux_show_setting(struct seq_file *s,
struct pinctrl_setting const *setting) const struct pinctrl_setting *setting)
{ {
} }
......
...@@ -152,12 +152,12 @@ struct pinctrl_map { ...@@ -152,12 +152,12 @@ struct pinctrl_map {
#ifdef CONFIG_PINCTRL #ifdef CONFIG_PINCTRL
extern int pinctrl_register_mappings(struct pinctrl_map const *map, extern int pinctrl_register_mappings(const struct pinctrl_map *map,
unsigned num_maps); unsigned num_maps);
extern void pinctrl_provide_dummies(void); extern void pinctrl_provide_dummies(void);
#else #else
static inline int pinctrl_register_mappings(struct pinctrl_map const *map, static inline int pinctrl_register_mappings(const struct pinctrl_map *map,
unsigned num_maps) unsigned num_maps)
{ {
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment