summaryrefslogtreecommitdiff
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2011-11-15 12:10:26 +0530
committerLinus Walleij <linus.walleij@linaro.org>2012-01-03 09:09:58 +0100
commitb84e673f51799a2d0bad7a7c1e7a74021c4eba4b (patch)
treed48507a6558f5cd00a410294f8cde59963d63aab /drivers/pinctrl
parent07f29ba67b7f016e8c968c8892f277bb50221ad4 (diff)
pinctrl: iterate over u300_pmx_mask's in u300_pmx_endisable
Fix u300_pmx_endisable() to iterate over the list of 'bits' and 'mask' populated as part of u300_pmx_functions.mask[] Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/pinmux-u300.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pinctrl/pinmux-u300.c b/drivers/pinctrl/pinmux-u300.c
index 4858a64131f8..145a84dc16e6 100644
--- a/drivers/pinctrl/pinmux-u300.c
+++ b/drivers/pinctrl/pinmux-u300.c
@@ -940,20 +940,23 @@ static void u300_pmx_endisable(struct u300_pmx *upmx, unsigned selector,
{
u16 regval, val, mask;
int i;
+ const struct u300_pmx_mask *upmx_mask;
+ upmx_mask = u300_pmx_functions[selector].mask;
for (i = 0; i < ARRAY_SIZE(u300_pmx_registers); i++) {
if (enable)
- val = u300_pmx_functions[selector].mask->bits;
+ val = upmx_mask->bits;
else
val = 0;
- mask = u300_pmx_functions[selector].mask->mask;
+ mask = upmx_mask->mask;
if (mask != 0) {
regval = readw(upmx->virtbase + u300_pmx_registers[i]);
regval &= ~mask;
regval |= val;
writew(regval, upmx->virtbase + u300_pmx_registers[i]);
}
+ upmx_mask++;
}
}