提交 c63bcc6f 编写于 作者: M Magnus Damm 提交者: Paul Mundt

sh: pfc: get_config_reg() shift clean up

Clean up the f_width shift code in get_config_reg().
Reported-by: NRyusuke Sakato <ryusuke.sakato.bx@renesas.com>
Signed-off-by: NMagnus Damm <damm@opensource.se>
Signed-off-by: NPaul Mundt <lethal@linux-sh.org>
上级 52e3124f
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册