@@ -31,7 +31,6 @@ static void exynos4210_usb_phy_clkset(struct platform_device *pdev)
struct clk *xusbxti_clk;
u32 phyclk;
-
xusbxti_clk = clk_get(&pdev->dev, "xusbxti");
if (xusbxti_clk && !IS_ERR(xusbxti_clk)) {
if (soc_is_exynos4210()) {
@@ -50,6 +49,8 @@ static void exynos4210_usb_phy_clkset(struct platform_device *pdev)
phyclk |= EXYNOS4210_CLKSEL_48M;
break;
}
+ clk_put(xusbxti_clk);
+ writel(phyclk, EXYNOS4_PHYCLK);
} else if (soc_is_exynos4212() || soc_is_exynos4412()) {
/* set clock frequency for PLL */
phyclk = readl(EXYNOS4_PHYCLK) & ~EXYNOS4X12_CLKSEL_MASK;
@@ -76,11 +77,10 @@ static void exynos4210_usb_phy_clkset(struct platform_device *pdev)
phyclk |= EXYNOS4X12_CLKSEL_24M;
break;
}
+ clk_put(xusbxti_clk);
+ writel(phyclk, EXYNOS4_PHYCLK);
}
- clk_put(xusbxti_clk);
}
-
- writel(phyclk, EXYNOS4_PHYCLK);
}
static int exynos4210_usb_phy0_init(struct platform_device *pdev)
Fixes the following warning: arch/arm/mach-exynos/setup-usb-phy.c: In function ‘exynos4210_usb_phy_clkset’: arch/arm/mach-exynos/setup-usb-phy.c:83:2: warning: ‘phyclk’ may be used uninitialized in this function [-Wuninitialized] Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> --- arch/arm/mach-exynos/setup-usb-phy.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)