mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 14:11:52 +00:00
pinctrl: samsung: constify iomem pointers
Constify few pointers to iomem, where the destination memory is not modified, for code safety and readability. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Sam Protsenko <semen.protsenko@linaro.org> Link: https://lore.kernel.org/r/20231223191902.22857-1-krzysztof.kozlowski@linaro.org Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
7d7cd22dc4
commit
1b09c2b8f8
@ -693,7 +693,7 @@ static void exynos_pinctrl_suspend_bank(
|
||||
struct samsung_pin_bank *bank)
|
||||
{
|
||||
struct exynos_eint_gpio_save *save = bank->soc_priv;
|
||||
void __iomem *regs = bank->eint_base;
|
||||
const void __iomem *regs = bank->eint_base;
|
||||
|
||||
save->eint_con = readl(regs + EXYNOS_GPIO_ECON_OFFSET
|
||||
+ bank->eint_offset);
|
||||
@ -714,7 +714,7 @@ static void exynosauto_pinctrl_suspend_bank(struct samsung_pinctrl_drv_data *drv
|
||||
struct samsung_pin_bank *bank)
|
||||
{
|
||||
struct exynos_eint_gpio_save *save = bank->soc_priv;
|
||||
void __iomem *regs = bank->eint_base;
|
||||
const void __iomem *regs = bank->eint_base;
|
||||
|
||||
save->eint_con = readl(regs + bank->pctl_offset + bank->eint_con_offset);
|
||||
save->eint_mask = readl(regs + bank->pctl_offset + bank->eint_mask_offset);
|
||||
|
@ -565,7 +565,7 @@ static void samsung_gpio_set(struct gpio_chip *gc, unsigned offset, int value)
|
||||
/* gpiolib gpio_get callback function */
|
||||
static int samsung_gpio_get(struct gpio_chip *gc, unsigned offset)
|
||||
{
|
||||
void __iomem *reg;
|
||||
const void __iomem *reg;
|
||||
u32 data;
|
||||
struct samsung_pin_bank *bank = gpiochip_get_data(gc);
|
||||
const struct samsung_pin_bank_type *type = bank->type;
|
||||
@ -1204,7 +1204,7 @@ static int __maybe_unused samsung_pinctrl_suspend(struct device *dev)
|
||||
|
||||
for (i = 0; i < drvdata->nr_banks; i++) {
|
||||
struct samsung_pin_bank *bank = &drvdata->pin_banks[i];
|
||||
void __iomem *reg = bank->pctl_base + bank->pctl_offset;
|
||||
const void __iomem *reg = bank->pctl_base + bank->pctl_offset;
|
||||
const u8 *offs = bank->type->reg_offset;
|
||||
const u8 *widths = bank->type->fld_width;
|
||||
enum pincfg_type type;
|
||||
|
Loading…
Reference in New Issue
Block a user