summaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorSanjay Singh Rawat <srawat@nvidia.com>2012-03-28 17:44:56 +0530
committerRohan Somvanshi <rsomvanshi@nvidia.com>2012-04-19 05:00:13 -0700
commitbdd8ce3b99c4ff20dc2f83698c1dc3ae5780fe30 (patch)
tree3cc970a567b781c7259d7aa85fa6c8405a43401f /drivers/power
parent20395e4c50ceea0d114c9beaaa5fa0e18b87915e (diff)
drivers: resolve compilation time warnings
bug 949219 Change-Id: I5942ba86bd1cbe1f1bd06a7c9f51a10d83e6cabb Signed-off-by: Sanjay Singh Rawat <srawat@nvidia.com> Reviewed-on: http://git-master/r/92819 Reviewed-by: Rohan Somvanshi <rsomvanshi@nvidia.com> Tested-by: Rohan Somvanshi <rsomvanshi@nvidia.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/max17048_battery.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/power/max17048_battery.c b/drivers/power/max17048_battery.c
index e43390984522..e5cdfa878267 100644
--- a/drivers/power/max17048_battery.c
+++ b/drivers/power/max17048_battery.c
@@ -276,13 +276,18 @@ static int max17048_write_rcomp_seg(struct i2c_client *client,
{
uint8_t rs1, rs2;
int ret;
+ uint8_t rcomp_seg_table[16];
rs2 = rcomp_seg | 0x00FF;
rs1 = rcomp_seg >> 8;
- uint8_t rcomp_seg_table[16] = { rs1, rs2, rs1, rs2,
- rs1, rs2, rs1, rs2,
- rs1, rs2, rs1, rs2,
- rs1, rs2, rs1, rs2};
+
+ rcomp_seg_table[0] = rcomp_seg_table[2] = rcomp_seg_table[4] =
+ rcomp_seg_table[6] = rcomp_seg_table[8] = rcomp_seg_table[10] =
+ rcomp_seg_table[12] = rcomp_seg_table[14] = rs1;
+
+ rcomp_seg_table[1] = rcomp_seg_table[3] = rcomp_seg_table[5] =
+ rcomp_seg_table[7] = rcomp_seg_table[9] = rcomp_seg_table[11] =
+ rcomp_seg_table[13] = rcomp_seg_table[15] = rs2;
ret = i2c_smbus_write_i2c_block_data(client, MAX17048_RCOMPSEG1,
16, (uint8_t *)rcomp_seg_table);