rk3288:pmic:act8846&syr82x:modify some warnings
author张晴 <zhangqing@rock-chips.com>
Thu, 12 Jun 2014 07:38:12 +0000 (15:38 +0800)
committer张晴 <zhangqing@rock-chips.com>
Thu, 12 Jun 2014 07:38:12 +0000 (15:38 +0800)
drivers/power/bq27320_battery.c
drivers/regulator/act8846.c
drivers/regulator/syr82x.c
include/linux/regulator/act8846.h

index 8a43be771862b3da7826a3802d931e83f3b23adf..349547f41af6529ad1ddbfe795a8375033914773 100755 (executable)
@@ -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];
 
index 9519294a4c4a32e73235ad0b4f2469b3c8279c2e..f2a3442e4209a9cdcd52b70db74f39ca9efe1709 100755 (executable)
@@ -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);
 
index ed0d4746a1b547dc5504982748c5318b2c191b8a..8b21513215ca1f1fcfd39577d5ea89eaa5aff466 100755 (executable)
@@ -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);
index 866291fbd3bb3e486ce4f067ba9a82656adf22b7..bdf424835b16c79f4275090207a7d1da5bb55aad 100755 (executable)
@@ -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;