diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2013-02-16 04:25:07 -0500 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2013-03-06 23:27:29 -0500 |
commit | 022ab148d28e8466e45d28552224e3029f1cccd8 (patch) | |
tree | 8af19f47261c907bb944c0403ba78a493f4d4906 /drivers/pinctrl/devicetree.c | |
parent | a72149e82b65b76d2dae5428a6b211eb43933529 (diff) |
pinctrl: Declare operation structures as const
The pinconf, pinctrl and pinmux operation structures hold function
pointers that are never modified. Declare them as const.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/devicetree.c')
-rw-r--r-- | drivers/pinctrl/devicetree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c index fd40a11ad645..c7b7cb477129 100644 --- a/drivers/pinctrl/devicetree.c +++ b/drivers/pinctrl/devicetree.c | |||
@@ -41,7 +41,7 @@ static void dt_free_map(struct pinctrl_dev *pctldev, | |||
41 | struct pinctrl_map *map, unsigned num_maps) | 41 | struct pinctrl_map *map, unsigned num_maps) |
42 | { | 42 | { |
43 | if (pctldev) { | 43 | if (pctldev) { |
44 | struct pinctrl_ops *ops = pctldev->desc->pctlops; | 44 | const struct pinctrl_ops *ops = pctldev->desc->pctlops; |
45 | ops->dt_free_map(pctldev, map, num_maps); | 45 | ops->dt_free_map(pctldev, map, num_maps); |
46 | } else { | 46 | } else { |
47 | /* There is no pctldev for PIN_MAP_TYPE_DUMMY_STATE */ | 47 | /* There is no pctldev for PIN_MAP_TYPE_DUMMY_STATE */ |
@@ -122,7 +122,7 @@ static int dt_to_map_one_config(struct pinctrl *p, const char *statename, | |||
122 | { | 122 | { |
123 | struct device_node *np_pctldev; | 123 | struct device_node *np_pctldev; |
124 | struct pinctrl_dev *pctldev; | 124 | struct pinctrl_dev *pctldev; |
125 | struct pinctrl_ops *ops; | 125 | const struct pinctrl_ops *ops; |
126 | int ret; | 126 | int ret; |
127 | struct pinctrl_map *map; | 127 | struct pinctrl_map *map; |
128 | unsigned num_maps; | 128 | unsigned num_maps; |