sh: pfc: get_config_reg() shift clean up
authorMagnus Damm <damm@opensource.se>
Mon, 17 Oct 2011 09:01:19 +0000 (18:01 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 28 Oct 2011 05:39:26 +0000 (14:39 +0900)
Clean up the f_width shift code in get_config_reg().

Reported-by: Ryusuke Sakato <ryusuke.sakato.bx@renesas.com>
Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
drivers/sh/pfc.c

index 75934e3..de5e3d6 100644 (file)
@@ -217,7 +217,7 @@ static int get_config_reg(struct pinmux_info *gpioc, pinmux_enum_t enum_id,
 
                if (!r_width)
                        break;
-               for (n = 0; n < (r_width / f_width) * 1 << f_width; n++) {
+               for (n = 0; n < (r_width / f_width) * (1 << f_width); n++) {
                        if (config_reg->enum_ids[n] == enum_id) {
                                *crp = config_reg;
                                *indexp = n;