Skip to contentSkip to conversation

ARM: OMAP2: twl-common: Fix compiler warning

PATCH New Peter Ujfalusi 2 participants 2 messages Jun 15, 2012 – Jun 20, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: OMAP2: twl-common: Fix compiler warning

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.

---
 arch/arm/mach-omap2/twl-common.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/twl-common.c +2 -0
index 119d5a9..5447c13 100644
@@ -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;
@@ -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,
Signature · 6 lines
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
maintainer
#1 lore raw

PATCH 1/1 ARM: OMAP2: twl-common: Fix compiler warning

Quoted 6 lines · Peter Ujfalusi

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.

Thanks applying into fixes.

Tony

Quoted 29 lines
---
 arch/arm/mach-omap2/twl-common.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
arch/arm/mach-omap2/twl-common.c +2 -0
index 119d5a9..5447c13 100644
@@ -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;
@@ -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,
Signature · 1 line
1.7.8.6