aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-12-10 22:26:21 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-12-12 16:06:49 -0500
commit8d72a7fc8dd74d41ec5f37b70797679e910007e0 (patch)
tree5d7a806e8065204b73fb6024225f4eaf6678599d
parentc420619d5177ac8f4a624a2ec6d0ed00b8b64ddb (diff)
sh-pfc: Turn unsigned indices into unsigned int
Some indices take positive values only, make them unsigned. 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>
-rw-r--r--drivers/pinctrl/sh-pfc/core.c8
-rw-r--r--drivers/pinctrl/sh-pfc/gpio.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c
index d77ece5217f0..06e648bf3a1b 100644
--- a/drivers/pinctrl/sh-pfc/core.c
+++ b/drivers/pinctrl/sh-pfc/core.c
@@ -29,7 +29,7 @@
29static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev) 29static int sh_pfc_ioremap(struct sh_pfc *pfc, struct platform_device *pdev)
30{ 30{
31 struct resource *res; 31 struct resource *res;
32 int k; 32 unsigned int k;
33 33
34 if (pdev->num_resources == 0) 34 if (pdev->num_resources == 0)
35 return -EINVAL; 35 return -EINVAL;
@@ -147,7 +147,7 @@ static void sh_pfc_config_reg_helper(struct sh_pfc *pfc,
147 unsigned long *maskp, 147 unsigned long *maskp,
148 unsigned long *posp) 148 unsigned long *posp)
149{ 149{
150 int k; 150 unsigned int k;
151 151
152 *mapped_regp = sh_pfc_phys_to_virt(pfc, crp->reg); 152 *mapped_regp = sh_pfc_phys_to_virt(pfc, crp->reg);
153 153
@@ -196,7 +196,7 @@ static int sh_pfc_get_config_reg(struct sh_pfc *pfc, u16 enum_id,
196{ 196{
197 const struct pinmux_cfg_reg *config_reg; 197 const struct pinmux_cfg_reg *config_reg;
198 unsigned long r_width, f_width, curr_width, ncomb; 198 unsigned long r_width, f_width, curr_width, ncomb;
199 int k, m, n, pos, bit_pos; 199 unsigned int k, m, n, pos, bit_pos;
200 200
201 k = 0; 201 k = 0;
202 while (1) { 202 while (1) {
@@ -238,7 +238,7 @@ static int sh_pfc_mark_to_enum(struct sh_pfc *pfc, u16 mark, int pos,
238 u16 *enum_idp) 238 u16 *enum_idp)
239{ 239{
240 const u16 *data = pfc->info->gpio_data; 240 const u16 *data = pfc->info->gpio_data;
241 int k; 241 unsigned int k;
242 242
243 if (pos) { 243 if (pos) {
244 *enum_idp = data[pos + 1]; 244 *enum_idp = data[pos + 1];
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c
index 04bf52b64fb3..3d30e6ecdf4a 100644
--- a/drivers/pinctrl/sh-pfc/gpio.c
+++ b/drivers/pinctrl/sh-pfc/gpio.c
@@ -204,7 +204,7 @@ static void gpio_pin_set(struct gpio_chip *gc, unsigned offset, int value)
204static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset) 204static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset)
205{ 205{
206 struct sh_pfc *pfc = gpio_to_pfc(gc); 206 struct sh_pfc *pfc = gpio_to_pfc(gc);
207 int i, k; 207 unsigned int i, k;
208 208
209 for (i = 0; i < pfc->info->gpio_irq_size; i++) { 209 for (i = 0; i < pfc->info->gpio_irq_size; i++) {
210 unsigned short *gpios = pfc->info->gpio_irq[i].gpios; 210 unsigned short *gpios = pfc->info->gpio_irq[i].gpios;