projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8dac1ea
)
protect handle before calling regulator_set_current_limit
author
hxy
<hxy@rock-chips.com>
Fri, 24 Sep 2010 07:46:33 +0000
(15:46 +0800)
committer
hxy
<hxy@rock-chips.com>
Fri, 24 Sep 2010 07:46:33 +0000
(15:46 +0800)
drivers/power/rk2818_battery.c
patch
|
blob
|
history
diff --git
a/drivers/power/rk2818_battery.c
b/drivers/power/rk2818_battery.c
index df151d1f4c7af6ca7508e65cb69c37ad3f1631a3..fad822e27c0d96c0a4e76c729b6099882ee31e72 100755
(executable)
--- a/
drivers/power/rk2818_battery.c
+++ b/
drivers/power/rk2818_battery.c
@@
-159,7
+159,7
@@
static int rk2818_get_charge_status(void)
{
DBG("CHARGE!\n");
if(gVbuscharge !=1) {
- if(
rdev== pChargeregulator
)
+ if(
!IS_ERR(rdev)
)
regulator_set_current_limit(rdev,0,1200000);
}
gVbuscharge = 1;
@@
-169,7
+169,7
@@
static int rk2818_get_charge_status(void)
{
DBG("NOT CHARGING!\n");
if(gVbuscharge !=0 ) {
- if(
rdev== pChargeregulator
)
+ if(
!IS_ERR(rdev)
)
regulator_set_current_limit(rdev,0,475000);
}
gVbuscharge = 0;