Skip to content

Commit

Permalink
ARM: mach-shmobile: ap4evb: fixup clk_put timing of fsib_clk
Browse files Browse the repository at this point in the history
fsib_clk will be used when fdiv_clk failed on fsi_hdmi_set_rate.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Kuninori Morimoto authored and Paul Mundt committed Jan 6, 2011
1 parent 025a10a commit 7367464
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions arch/arm/mach-shmobile/board-ap4evb.c
Original file line number Diff line number Diff line change
Expand Up @@ -674,20 +674,23 @@ static int fsi_hdmi_set_rate(struct device *dev, int rate, int enable)
return -EIO;

ret = __fsi_set_round_rate(fsib_clk, fsib_rate, enable);
clk_put(fsib_clk);
if (ret < 0)
return ret;
goto fsi_set_rate_end;

/* FSI DIV setting */
ret = __fsi_set_round_rate(fdiv_clk, fdiv_rate, enable);
if (ret < 0) {
/* disable FSI B */
if (enable)
__fsi_set_round_rate(fsib_clk, fsib_rate, 0);
return ret;
goto fsi_set_rate_end;
}

return ackmd_bpfmd;
ret = ackmd_bpfmd;

fsi_set_rate_end:
clk_put(fsib_clk);
return ret;
}

static int fsi_set_rate(struct device *dev, int is_porta, int rate, int enable)
Expand Down

0 comments on commit 7367464

Please sign in to comment.