Skip to contentSkip to conversation

mfd: Guard max77686_pmic_dt_match with CONFIG_OF

PATCH In review Axel Lin 2 participants 2 messages Jul 9, 2012 – Jul 10, 2012

Subsystems (2)
lore
Share & tools
lore

Axel Lin

author
#0 lore raw

PATCH 1/1 mfd: Guard max77686_pmic_dt_match with CONFIG_OF

This fixes below build warning if CONFIG_OF is not set.

CC drivers/mfd/max77686.o
drivers/mfd/max77686.c:37:42: warning: 'max77686_pmic_dt_match' defined but not used [-Wunused-variable]

---
 drivers/mfd/max77686.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/mfd/max77686.c +5 -5
index 3e31d05..c03e12b 100644
@@ -34,11 +34,6 @@
 
 #define I2C_ADDR_RTC	(0x0C >> 1)
 
-static struct of_device_id __devinitdata max77686_pmic_dt_match[] = {
-	{.compatible = "maxim,max77686",        .data = 0},
-	{},
-};
-
 static struct mfd_cell max77686_devs[] = {
 	{ .name = "max77686-pmic", },
 	{ .name = "max77686-rtc", },
@@ -50,6 +45,11 @@ static struct regmap_config max77686_regmap_config = {
 };
 
 #ifdef CONFIG_OF
+static struct of_device_id __devinitdata max77686_pmic_dt_match[] = {
+	{.compatible = "maxim,max77686",        .data = 0},
+	{},
+};
+
 static struct max77686_platform_data *max77686_i2c_parse_dt_pdata(struct device
 								  *dev)
 {
Signature · 1 line
1.7.9.5
#1 lore raw

Hi Axel,

Quoted 9 lines · Axel Lin

This fixes below build warning if CONFIG_OF is not set.

CC drivers/mfd/max77686.o
drivers/mfd/max77686.c:37:42: warning: 'max77686_pmic_dt_match' defined but not used [-Wunused-variable]

---
 drivers/mfd/max77686.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Thanks, patch applied.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/