Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367524
b: refs/heads/master
c: 4b44a1e
h: refs/heads/master
v: v3
  • Loading branch information
Kim, Milo authored and Anton Vorontsov committed Apr 1, 2013
1 parent c5575a6 commit 6498367
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 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: feeb3a92b1f4e4b53bbad2b1c0d0eb1bcdd6d5a7
refs/heads/master: 4b44a1ed82b4c2462d86fede459a802668b19d45
8 changes: 3 additions & 5 deletions trunk/drivers/power/lp8788-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
#define LP8788_CHG_START 0x11
#define LP8788_CHG_END 0x1C

#define LP8788_BUF_SIZE 40
#define LP8788_ISEL_MAX 23
#define LP8788_ISEL_STEP 50
#define LP8788_VTERM_MIN 4100
Expand Down Expand Up @@ -633,7 +632,7 @@ static ssize_t lp8788_show_charger_status(struct device *dev,
lp8788_read_byte(pchg->lp, LP8788_CHG_STATUS, &data);
state = (data & LP8788_CHG_STATE_M) >> LP8788_CHG_STATE_S;

return scnprintf(buf, LP8788_BUF_SIZE, "%s\n", desc[state]);
return scnprintf(buf, PAGE_SIZE, "%s\n", desc[state]);
}

static ssize_t lp8788_show_eoc_time(struct device *dev,
Expand All @@ -647,7 +646,7 @@ static ssize_t lp8788_show_eoc_time(struct device *dev,
lp8788_read_byte(pchg->lp, LP8788_CHG_EOC, &val);
val = (val & LP8788_CHG_EOC_TIME_M) >> LP8788_CHG_EOC_TIME_S;

return scnprintf(buf, LP8788_BUF_SIZE, "End Of Charge Time: %s\n",
return scnprintf(buf, PAGE_SIZE, "End Of Charge Time: %s\n",
stime[val]);
}

Expand All @@ -667,8 +666,7 @@ static ssize_t lp8788_show_eoc_level(struct device *dev,
val = (val & LP8788_CHG_EOC_LEVEL_M) >> LP8788_CHG_EOC_LEVEL_S;
level = mode ? abs_level[val] : relative_level[val];

return scnprintf(buf, LP8788_BUF_SIZE, "End Of Charge Level: %s\n",
level);
return scnprintf(buf, PAGE_SIZE, "End Of Charge Level: %s\n", level);
}

static DEVICE_ATTR(charger_status, S_IRUSR, lp8788_show_charger_status, NULL);
Expand Down

0 comments on commit 6498367

Please sign in to comment.