Commit 6354ab5c authored by Samuel Ortiz's avatar Samuel Ortiz Committed by Samuel Ortiz

mfd: Fix twl4030-core.c build error

This is a fix for:

twl4030-core.c:(.text+0x16a797): undefined reference to `clk_get_rate'
twl4030-core.c:(.text+0x16a797): undefined reference to `clk_put'

on x86 and x86_64, as the clock API is not defined on those platforms.
Signed-off-by: default avatarSamuel Ortiz <sameo@openedhand.com>
parent b73eac78
...@@ -658,12 +658,7 @@ static void __init clocks_init(void) ...@@ -658,12 +658,7 @@ static void __init clocks_init(void)
osc = clk_get(NULL, "osc_ck"); osc = clk_get(NULL, "osc_ck");
else else
osc = clk_get(NULL, "osc_sys_ck"); osc = clk_get(NULL, "osc_sys_ck");
#else
/* REVISIT for non-OMAP systems, pass the clock rate from
* board init code, using platform_data.
*/
osc = ERR_PTR(-EIO);
#endif
if (IS_ERR(osc)) { if (IS_ERR(osc)) {
printk(KERN_WARNING "Skipping twl4030 internal clock init and " printk(KERN_WARNING "Skipping twl4030 internal clock init and "
"using bootloader value (unknown osc rate)\n"); "using bootloader value (unknown osc rate)\n");
...@@ -673,6 +668,18 @@ static void __init clocks_init(void) ...@@ -673,6 +668,18 @@ static void __init clocks_init(void)
rate = clk_get_rate(osc); rate = clk_get_rate(osc);
clk_put(osc); clk_put(osc);
#else
/* REVISIT for non-OMAP systems, pass the clock rate from
* board init code, using platform_data.
*/
osc = ERR_PTR(-EIO);
printk(KERN_WARNING "Skipping twl4030 internal clock init and "
"using bootloader value (unknown osc rate)\n");
return;
#endif
switch (rate) { switch (rate) {
case 19200000: case 19200000:
ctrl = HFCLK_FREQ_19p2_MHZ; ctrl = HFCLK_FREQ_19p2_MHZ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment