Skip to content

Commit

Permalink
sh: pfc: get_config_reg() shift clean up
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Magnus Damm authored and Paul Mundt committed Oct 28, 2011
1 parent 52e3124 commit c63bcc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/sh/pfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c63bcc6

Please sign in to comment.