summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/sh-pfc/core.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-12-11 04:26:25 +0100
committerLinus Walleij <linus.walleij@linaro.org>2013-12-12 22:07:23 +0100
commit5b46ac3a7723636082ec6234289517ca5b9c65af (patch)
treebc81b311d17770ebf5efd64d5b9c1a650c49a5fc /drivers/pinctrl/sh-pfc/core.c
parentde55c71feb312baa7cf18d3eb966e3bf932d455a (diff)
sh-pfc: Rename sh_pfc window field to windows
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>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/core.c')
-rw-r--r--drivers/pinctrl/sh-pfc/core.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c
index 06e648bf3a1b..7831f078a5ef 100644
--- a/drivers/pinctrl/sh-pfc/core.c
+++ b/drivers/pinctrl/sh-pfc/core.c
@@ -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;