Skip to content

Commit

Permalink
ARM: OMAP2: twl-common: Fix compiler warning
Browse files Browse the repository at this point in the history
If the kernel is built only for OMAP2 the following warning will show up:

arch/arm/mach-omap2/twl-common.c:52: warning: ‘twl_set_voltage’ defined but not used
arch/arm/mach-omap2/twl-common.c:58: warning: ‘twl_get_voltage’ defined but not used

The twl_set/get_voltage callbacks only used when OMAP3/4 is selected.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
  • Loading branch information
Peter Ujfalusi authored and Tony Lindgren committed Jun 21, 2012
1 parent 97ee9f0 commit da0085f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/twl-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ static struct i2c_board_info __initdata omap4_i2c1_board_info[] = {
},
};

#if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
static int twl_set_voltage(void *data, int target_uV)
{
struct voltagedomain *voltdm = (struct voltagedomain *)data;
Expand All @@ -59,6 +60,7 @@ static int twl_get_voltage(void *data)
struct voltagedomain *voltdm = (struct voltagedomain *)data;
return voltdm_get_voltage(voltdm);
}
#endif

void __init omap_pmic_init(int bus, u32 clkrate,
const char *pmic_type, int pmic_irq,
Expand Down

0 comments on commit da0085f

Please sign in to comment.