From: Kuninori Morimoto Date: Mon, 7 May 2012 01:12:41 +0000 (-0700) Subject: ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s X-Git-Tag: v3.5-rc1~153^2~3^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c8241085e8606a14ef48e6d99556133c48aaddaf;p=karo-tx-linux.git ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s If the clocks is always same value as the parent clock, we can use followparent_recalc() for .recalc Reported-by: Paul Mundt Signed-off-by: Kuninori Morimoto Reviewed-by: Simon Horman Acked-by: Magnus Damm Signed-off-by: Rafael J. Wysocki --- diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index 89a2f9dad3b3..81b54a6af20f 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c @@ -188,11 +188,6 @@ static struct clk *usb24s_parents[] = { [1] = &extal2_clk }; -static unsigned long usb24s_recalc(struct clk *clk) -{ - return clk->parent->rate; -}; - static int usb24s_enable(struct clk *clk) { __raw_writel(__raw_readl(USBCKCR) & ~(1 << 8), USBCKCR); @@ -234,7 +229,7 @@ static int usb24s_set_parent(struct clk *clk, struct clk *parent) } static struct sh_clk_ops usb24s_clk_ops = { - .recalc = usb24s_recalc, + .recalc = followparent_recalc, .enable = usb24s_enable, .disable = usb24s_disable, .set_parent = usb24s_set_parent,