sh-pfc: Rename sh_pfc window field to windows
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Wed, 11 Dec 2013 03:26:25 +0000 (04:26 +0100)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 12 Dec 2013 21:07:23 +0000 (22:07 +0100)
There's more than one window, name the field windows.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/sh-pfc/core.c
drivers/pinctrl/sh-pfc/core.h
drivers/pinctrl/sh-pfc/gpio.c
drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
drivers/pinctrl/sh-pfc/pfc-r8a7740.c
drivers/pinctrl/sh-pfc/pfc-sh7372.c
drivers/pinctrl/sh-pfc/pfc-sh73a0.c

index 06e648bf3a1b4f9a973476f37ab4943994298d05..7831f078a5ef77969d24a2c22a03c88441b2fe9e 100644 (file)
@@ -34,20 +34,21 @@ static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev)
        if (pdev->num_resources == 0)
                return -EINVAL;
 
-       pfc->window = devm_kzalloc(pfc->dev, pdev->num_resources *
-                                  sizeof(*pfc->window), GFP_NOWAIT);
-       if (!pfc->window)
+       pfc->windows = devm_kzalloc(pfc->dev, pdev->num_resources *
+                                   sizeof(*pfc->windows), GFP_NOWAIT);
+       if (!pfc->windows)
                return -ENOMEM;
 
        pfc->num_windows = pdev->num_resources;
 
        for (k = 0, res = pdev->resource; k < pdev->num_resources; k++, res++) {
                WARN_ON(resource_type(res) != IORESOURCE_MEM);
-               pfc->window[k].phys = res->start;
-               pfc->window[k].size = resource_size(res);
-               pfc->window[k].virt = devm_ioremap_nocache(pfc->dev, res->start,
-                                                          resource_size(res));
-               if (!pfc->window[k].virt)
+               pfc->windows[k].phys = res->start;
+               pfc->windows[k].size = resource_size(res);
+               pfc->windows[k].virt =
+                       devm_ioremap_nocache(pfc->dev, res->start,
+                                            resource_size(res));
+               if (!pfc->windows[k].virt)
                        return -ENOMEM;
        }
 
@@ -62,7 +63,7 @@ static void __iomem *sh_pfc_phys_to_virt(struct sh_pfc *pfc,
 
        /* scan through physical windows and convert address */
        for (i = 0; i < pfc->num_windows; i++) {
-               window = pfc->window + i;
+               window = pfc->windows + i;
 
                if (address < window->phys)
                        continue;
index 11ea87268658c706e993b9ed9791ab2b1b6d5ae3..a83b7472e674f2b7eaed2e0cff80ce8c8b673137 100644 (file)
@@ -37,7 +37,7 @@ struct sh_pfc {
        spinlock_t lock;
 
        unsigned int num_windows;
-       struct sh_pfc_window *window;
+       struct sh_pfc_window *windows;
 
        struct sh_pfc_pin_range *ranges;
        unsigned int nr_ranges;
index c24be810f56ce2c01acb76dc6ef14f9da6fdd288..6a21349fb116fa1b1c8cb90408b976f2defd9c64 100644 (file)
@@ -347,7 +347,7 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
         * GPIOs.
         */
        for (i = 0; i < pfc->num_windows; ++i) {
-               struct sh_pfc_window *window = &pfc->window[i];
+               struct sh_pfc_window *window = &pfc->windows[i];
 
                if (pfc->info->data_regs[0].reg >= window->phys &&
                    pfc->info->data_regs[0].reg < window->phys + window->size)
@@ -358,7 +358,7 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc)
                return 0;
 
        /* Register the real GPIOs chip. */
-       chip = sh_pfc_add_gpiochip(pfc, gpio_pin_setup, &pfc->window[i]);
+       chip = sh_pfc_add_gpiochip(pfc, gpio_pin_setup, &pfc->windows[i]);
        if (IS_ERR(chip))
                return PTR_ERR(chip);
 
index d76cc343a82a4eb7dfb8c1dd5696a25e2ba1e0f2..32dd478f28e3a07257352fcfed73bec7c6ff9fb2 100644 (file)
@@ -2680,7 +2680,7 @@ static unsigned int r8a73a4_pinmux_get_bias(struct sh_pfc *pfc,
 {
        void __iomem *addr;
 
-       addr = pfc->window->virt + r8a73a4_portcr_offsets[pin >> 5] + pin;
+       addr = pfc->windows->virt + r8a73a4_portcr_offsets[pin >> 5] + pin;
 
        switch (ioread8(addr) & PORTCR_PULMD_MASK) {
        case PORTCR_PULMD_UP:
@@ -2699,7 +2699,7 @@ static void r8a73a4_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
        void __iomem *addr;
        u32 value;
 
-       addr = pfc->window->virt + r8a73a4_portcr_offsets[pin >> 5] + pin;
+       addr = pfc->windows->virt + r8a73a4_portcr_offsets[pin >> 5] + pin;
        value = ioread8(addr) & ~PORTCR_PULMD_MASK;
 
        switch (bias) {
index 7ac006583558a16e1c4d3b53b1178c2de51b5471..a189b962a1eba6181f4392422182c2272e87430a 100644 (file)
@@ -3710,7 +3710,7 @@ static void __iomem *r8a7740_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
                        &r8a7740_portcr_offsets[i];
 
                if (i <= group->end_pin)
-                       return pfc->window->virt + group->offset + pin;
+                       return pfc->windows->virt + group->offset + pin;
        }
 
        return NULL;
index 4fea6ceb2dbfbb885c79f5c8935dea9bd59a3ecc..bcdd5c3cdcf08ed3500af15f0b5002f12f2d079a 100644 (file)
@@ -2574,7 +2574,7 @@ static void __iomem *sh7372_pinmux_portcr(struct sh_pfc *pfc, unsigned int pin)
                        &sh7372_portcr_offsets[i];
 
                if (i <= group->end_pin)
-                       return pfc->window->virt + group->offset + pin;
+                       return pfc->windows->virt + group->offset + pin;
        }
 
        return NULL;
index a8d472210e3219c45fb50aba9d158fe48db1c4b6..dc7c7fb3380594cf3b6f90768343064bdce3ff3b 100644 (file)
@@ -3692,7 +3692,7 @@ static const struct pinmux_irq pinmux_irqs[] = {
 static void sh73a0_vccq_mc0_endisable(struct regulator_dev *reg, bool enable)
 {
        struct sh_pfc *pfc = reg->reg_data;
-       void __iomem *addr = pfc->window[1].virt + 4;
+       void __iomem *addr = pfc->windows[1].virt + 4;
        unsigned long flags;
        u32 value;
 
@@ -3725,7 +3725,7 @@ static int sh73a0_vccq_mc0_disable(struct regulator_dev *reg)
 static int sh73a0_vccq_mc0_is_enabled(struct regulator_dev *reg)
 {
        struct sh_pfc *pfc = reg->reg_data;
-       void __iomem *addr = pfc->window[1].virt + 4;
+       void __iomem *addr = pfc->windows[1].virt + 4;
        unsigned long flags;
        u32 value;
 
@@ -3784,7 +3784,7 @@ static const unsigned int sh73a0_portcr_offsets[] = {
 
 static unsigned int sh73a0_pinmux_get_bias(struct sh_pfc *pfc, unsigned int pin)
 {
-       void __iomem *addr = pfc->window->virt
+       void __iomem *addr = pfc->windows->virt
                           + sh73a0_portcr_offsets[pin >> 5] + pin;
        u32 value = ioread8(addr) & PORTnCR_PULMD_MASK;
 
@@ -3802,7 +3802,7 @@ static unsigned int sh73a0_pinmux_get_bias(struct sh_pfc *pfc, unsigned int pin)
 static void sh73a0_pinmux_set_bias(struct sh_pfc *pfc, unsigned int pin,
                                   unsigned int bias)
 {
-       void __iomem *addr = pfc->window->virt
+       void __iomem *addr = pfc->windows->virt
                           + sh73a0_portcr_offsets[pin >> 5] + pin;
        u32 value = ioread8(addr) & ~PORTnCR_PULMD_MASK;