rk3288:pmic:ricoh619:modify some warning
author张晴 <zhangqing@rock-chips.com>
Tue, 27 May 2014 01:28:18 +0000 (09:28 +0800)
committer张晴 <zhangqing@rock-chips.com>
Tue, 27 May 2014 01:28:18 +0000 (09:28 +0800)
drivers/mfd/ricoh619-irq.c
drivers/power/ricoh619-battery.c

index 7a55fdae129cd296220c77b0a9c9cf318ba3e329..e3fba0d99b9cc02149a34416a3c53720b3944b1e 100755 (executable)
@@ -326,7 +326,7 @@ static irqreturn_t ricoh619_irq(int irq, void *data)
        int i;
        int ret;
        unsigned int rtc_int_sts = 0;
-       int cur_irq;
+       int cur_irq = 0;
 
        ret = ricoh619_read(ricoh619->dev, RICOH619_INT_IR_SYS, &ricoh619_pwr_key_reg);
 
@@ -426,10 +426,11 @@ static irqreturn_t ricoh619_irq(int irq, void *data)
 
        for (i = 0; i <RICOH619_NR_IRQS; ++i) {
                const struct ricoh619_irq_data *data = &ricoh619_irqs[i];
-               if ((int_sts[data->mask_reg_index] & (1 << data->int_en_bit)) &&(ricoh619->group_irq_en[data->master_bit] & (1 << data->grp_index)))
+               if ((int_sts[data->mask_reg_index] & (1 << data->int_en_bit)) &&(ricoh619->group_irq_en[data->master_bit] & (1 << data->grp_index))){
                        cur_irq = irq_find_mapping(ricoh619->irq_domain, i);
-               if (cur_irq)
-                       handle_nested_irq(cur_irq);
+                       if (cur_irq)
+                               handle_nested_irq(cur_irq);
+               }
        }
 
 //     printk(KERN_INFO "PMU: %s: out\n", __func__);
index 6be578cda222361bacb331a127c4fb960a6a2f94..d44d3a0bb7f8547d753f98b40f33fbaf325309c3 100755 (executable)
@@ -3450,7 +3450,7 @@ static void vadp_drop_irq_work(struct work_struct *work)
                 struct ricoh619_battery_info, vadp_drop_work.work);
 
        int ret = 0;
-       uint8_t data[5];
+       uint8_t data[6];
        u16 reg[2];
 
        RICOH_FG_DBG("PMU vadp_drop_work:%s In\n", __func__);
@@ -4063,7 +4063,8 @@ static int ricoh619_batt_get_prop(struct power_supply *psy,
 
        /* this setting is same as battery driver of 584 */
        case POWER_SUPPLY_PROP_PRESENT:
-               val->intval = info->present;
+       //      val->intval = info->present;
+               val->intval = 1;
                break;
 
        /* current voltage is get from fuel gauge */
@@ -4867,7 +4868,7 @@ static int ricoh619_battery_resume(struct device *dev)
 
        if(info->chg_complete_sleep_flag == 1)
        {
-               info->chg_complete_tm_ov_flag == 1;
+               info->chg_complete_tm_ov_flag = 1;
                info->chg_complete_sleep_flag = 0;
        }