diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-08-29 16:59:19 +0300 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-08-30 21:44:38 +0300 |
commit | e075cbfeb41ef1ce8b1bae7838ac985297ab367e (patch) | |
tree | 9a971228e617f5cb5c44fdfcfdef4430a03c21d4 /drivers/pinctrl/intel/pinctrl-intel.c | |
parent | 13791bb6bf4318fbd8b901a4506fa9bb0d2083df (diff) |
pinctrl: intel: Constify intel_get_community() returned object
There is nothing prevents us from constifying intel_get_community()
returned object. Do it to make code more robust.
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/pinctrl/intel/pinctrl-intel.c')
-rw-r--r-- | drivers/pinctrl/intel/pinctrl-intel.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/pinctrl/intel/pinctrl-intel.c b/drivers/pinctrl/intel/pinctrl-intel.c index 46530ee6e92d..e8dbaf3964dc 100644 --- a/drivers/pinctrl/intel/pinctrl-intel.c +++ b/drivers/pinctrl/intel/pinctrl-intel.c @@ -114,9 +114,9 @@ struct intel_community_context { #define pin_to_padno(c, p) ((p) - (c)->pin_base) #define padgroup_offset(g, p) ((p) - (g)->base) -struct intel_community *intel_get_community(struct intel_pinctrl *pctrl, unsigned int pin) +const struct intel_community *intel_get_community(struct intel_pinctrl *pctrl, unsigned int pin) { - struct intel_community *community; + const struct intel_community *community; int i; for (i = 0; i < pctrl->ncommunities; i++) { @@ -236,7 +236,7 @@ enum { static int intel_pad_locked(struct intel_pinctrl *pctrl, unsigned int pin) { - struct intel_community *community; + const struct intel_community *community; const struct intel_padgroup *padgrp; unsigned int offset, gpp_offset; u32 value; @@ -1368,7 +1368,7 @@ static int intel_gpio_add_pin_ranges(struct gpio_chip *gc) int ret, i; for (i = 0; i < pctrl->ncommunities; i++) { - struct intel_community *community = &pctrl->communities[i]; + const struct intel_community *community = &pctrl->communities[i]; ret = intel_gpio_add_community_ranges(pctrl, community); if (ret) { |