Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330479
b: refs/heads/master
c: bc909f2
h: refs/heads/master
i:
  330477: ed4c6b3
  330475: 85f0639
  330471: 310a156
  330463: 4892622
v: v3
  • Loading branch information
Anton Vorontsov committed Aug 23, 2012
1 parent ca67c03 commit ae4ceb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6297b5e54b5511d4e72e8d5fc3b139650adc74d8
refs/heads/master: bc909f27f55ceb8f950ced5cf3a26d6b26e86ca6
9 changes: 8 additions & 1 deletion trunk/drivers/power/da9052-battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ static int da9052_bat_interpolate(int vbat_lower, int vbat_upper,
return tmp;
}

unsigned char da9052_determine_vc_tbl_index(unsigned char adc_temp)
static unsigned char da9052_determine_vc_tbl_index(unsigned char adc_temp)
{
int i;

Expand All @@ -345,6 +345,13 @@ unsigned char da9052_determine_vc_tbl_index(unsigned char adc_temp)
&& (adc_temp <= vc_tbl_ref[i]))
return i + 1;
}
/*
* For some reason authors of the driver didn't presume that we can
* end up here. It might be OK, but might be not, no one knows for
* sure. Go check your battery, is it on fire?
*/
WARN_ON(1);
return 0;
}

static int da9052_bat_read_capacity(struct da9052_battery *bat, int *capacity)
Expand Down

0 comments on commit ae4ceb0

Please sign in to comment.