From 8f8749c3596502d94a28cb7be91c8597460798a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Tue, 27 May 2014 09:28:18 +0800 Subject: [PATCH] rk3288:pmic:ricoh619:modify some warning --- drivers/mfd/ricoh619-irq.c | 9 +++++---- drivers/power/ricoh619-battery.c | 7 ++++--- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/mfd/ricoh619-irq.c b/drivers/mfd/ricoh619-irq.c index 7a55fdae129c..e3fba0d99b9c 100755 --- a/drivers/mfd/ricoh619-irq.c +++ b/drivers/mfd/ricoh619-irq.c @@ -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 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__); diff --git a/drivers/power/ricoh619-battery.c b/drivers/power/ricoh619-battery.c index 6be578cda222..d44d3a0bb7f8 100755 --- a/drivers/power/ricoh619-battery.c +++ b/drivers/power/ricoh619-battery.c @@ -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; } -- 2.34.1