From a05c3a39733749ca02d8623337c5c1bde2daf842 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Thu, 12 Jun 2014 15:38:12 +0800 Subject: [PATCH] rk3288:pmic:act8846&syr82x:modify some warnings --- drivers/power/bq27320_battery.c | 8 ++++---- drivers/regulator/act8846.c | 12 +++++------- drivers/regulator/syr82x.c | 2 +- include/linux/regulator/act8846.h | 2 +- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/drivers/power/bq27320_battery.c b/drivers/power/bq27320_battery.c index 8a43be771862..349547f41af6 100755 --- a/drivers/power/bq27320_battery.c +++ b/drivers/power/bq27320_battery.c @@ -1175,7 +1175,7 @@ static void bq27320_battery_work(struct work_struct *work) #endif schedule_delayed_work(&di->work, 1*HZ); } - +#if 0 static void bq27320_set(void) { struct bq27320_device_info *di; @@ -1220,7 +1220,7 @@ static void bq27320_set(void) else printk("bq27320 write 0x21 success\n"); } - +#endif static int bq27320_battery_suspend(struct i2c_client *client, pm_message_t mesg) { @@ -1233,6 +1233,7 @@ static int bq27320_battery_resume(struct i2c_client *client) schedule_delayed_work(&bq27320_di->work, msecs_to_jiffies(50)); return 0; } +#if 0 static int bq27320_is_in_rom_mode(void) { int ret = 0; @@ -1247,7 +1248,7 @@ static int bq27320_is_in_rom_mode(void) else return 0; } - +#endif #ifdef CONFIG_OF static struct of_device_id bq27320_battery_of_match[] = { { .compatible = "ti,bq27320"}, @@ -1261,7 +1262,6 @@ static int bq27320_battery_probe(struct i2c_client *client, { struct bq27320_device_info *di; int retval = 0; - struct bq27320_board *pdev; struct device_node *bq27320_node; u8 buf[2]; diff --git a/drivers/regulator/act8846.c b/drivers/regulator/act8846.c index 9519294a4c4a..f2a3442e4209 100755 --- a/drivers/regulator/act8846.c +++ b/drivers/regulator/act8846.c @@ -54,7 +54,9 @@ struct act8846 { struct i2c_client *i2c; int num_regulators; struct regulator_dev **rdev; -// struct early_suspend act8846_suspend; +#ifdef CONFIG_HAS_EARLYSUSPEND + struct early_suspend act8846_suspend; +#endif int irq_base; int chip_irq; int pmic_sleep_gpio; /* */ @@ -459,8 +461,7 @@ static int act8846_dcdc_set_mode(struct regulator_dev *dev, unsigned int mode) static int act8846_dcdc_set_voltage_time_sel(struct regulator_dev *dev, unsigned int old_selector, unsigned int new_selector) { - struct act8846 *act8846 = rdev_get_drvdata(dev); - int ret =0,old_volt, new_volt; + int old_volt, new_volt; old_volt = act8846_dcdc_list_voltage(dev, old_selector); if (old_volt < 0) @@ -793,10 +794,8 @@ static struct act8846_board *act8846_parse_dt(struct i2c_client *i2c) #endif -int act8846_device_shutdown(void) +void act8846_device_shutdown(void) { - int ret; - int err = -1; struct act8846 *act8846 = g_act8846; printk("%s\n",__func__); @@ -816,7 +815,6 @@ int act8846_device_shutdown(void) return err; } #endif - return 0; } EXPORT_SYMBOL_GPL(act8846_device_shutdown); diff --git a/drivers/regulator/syr82x.c b/drivers/regulator/syr82x.c index ed0d4746a1b5..8b21513215ca 100755 --- a/drivers/regulator/syr82x.c +++ b/drivers/regulator/syr82x.c @@ -445,7 +445,7 @@ static struct syr82x_board *syr82x_parse_dt(struct syr82x *syr82x) struct syr82x_board *pdata; struct device_node *regs; struct device_node *syr82x_np; - int gpio,count; + int count; DBG("%s,line=%d\n", __func__,__LINE__); syr82x_np = of_node_get(syr82x->dev->of_node); diff --git a/include/linux/regulator/act8846.h b/include/linux/regulator/act8846.h index 866291fbd3bb..bdf424835b16 100755 --- a/include/linux/regulator/act8846.h +++ b/include/linux/regulator/act8846.h @@ -27,7 +27,7 @@ #define act8846_NUM_REGULATORS 12 struct act8846; -int act8846_device_shutdown(void); +void act8846_device_shutdown(void); struct act8846_board { int irq; -- 2.34.1