Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330510
b: refs/heads/master
c: 65272ba
h: refs/heads/master
v: v3
  • Loading branch information
Kim, Milo authored and Anton Vorontsov committed Sep 21, 2012
1 parent 48d4028 commit d444ad0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 18763a36d0bae11a916ffe8fa58a26fd0b5eb115
refs/heads/master: 65272bac3a24162b7362eccf9a30a481f2139266
14 changes: 6 additions & 8 deletions trunk/drivers/power/lp8727_charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,14 @@ static int lp8727_write_byte(struct lp8727_chg *pchg, u8 reg, u8 data)
return ret;
}

static int lp8727_is_charger_attached(const char *name, int id)
static bool lp8727_is_charger_attached(const char *name, int id)
{
if (name) {
if (!strcmp(name, "ac"))
return (id == LP8727_ID_TA || id == LP8727_ID_DEDICATED_CHG) ? 1 : 0;
else if (!strcmp(name, "usb"))
return (id == LP8727_ID_USB_CHG) ? 1 : 0;
}
if (!strcmp(name, "ac"))
return id == LP8727_ID_TA || id == LP8727_ID_DEDICATED_CHG;
else if (!strcmp(name, "usb"))
return id == LP8727_ID_USB_CHG;

return (id >= LP8727_ID_TA && id <= LP8727_ID_USB_CHG) ? 1 : 0;
return id >= LP8727_ID_TA && id <= LP8727_ID_USB_CHG;
}

static int lp8727_init_device(struct lp8727_chg *pchg)
Expand Down

0 comments on commit d444ad0

Please sign in to comment.