Skip to content

Commit

Permalink
ab8500_fg: Get rid of 'struct v_to_cap'
Browse files Browse the repository at this point in the history
The struct is duplicated, plus when used it causes the following
warnings:

  CHECK   drivers/power/ab8500_fg.c
ab8500_fg.c:818:13: warning: incorrect type in assignment (different base types)
ab8500_fg.c:818:13:    expected struct v_to_cap *tbl
ab8500_fg.c:818:13:    got struct abx500_v_to_cap *const v_to_cap_tbl
  CC      drivers/power/ab8500_fg.o
ab8500_fg.c: In function 'ab8500_fg_volt_to_capacity':
ab8500_fg.c:818:6: warning: assignment from incompatible pointer type [enabled by default]

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
  • Loading branch information
Anton Vorontsov committed Mar 26, 2012
1 parent d329129 commit 450ceb2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
2 changes: 1 addition & 1 deletion drivers/power/ab8500_fg.c
Original file line number Diff line number Diff line change
Expand Up @@ -812,7 +812,7 @@ static int ab8500_fg_bat_voltage(struct ab8500_fg *di)
static int ab8500_fg_volt_to_capacity(struct ab8500_fg *di, int voltage)
{
int i, tbl_size;
struct v_to_cap *tbl;
struct abx500_v_to_cap *tbl;
int cap = 0;

tbl = di->bat->bat_type[di->bat->batt_id].v_to_cap_tbl,
Expand Down
10 changes: 0 additions & 10 deletions include/linux/mfd/abx500/ab8500-bm.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,16 +255,6 @@ struct batres_vs_temp {
int resist;
};

/**
* struct v_to_cap - Table for translating voltage to capacity
* @voltage: Voltage in mV
* @capacity: Capacity in percent
*/
struct v_to_cap {
int voltage;
int capacity;
};

/* Forward declaration */
struct ab8500_fg;

Expand Down

0 comments on commit 450ceb2

Please sign in to comment.