Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350607
b: refs/heads/master
c: d5c2b14
h: refs/heads/master
i:
  350605: 7065e34
  350603: 86b9d9c
  350599: aaf199b
  350591: 850b27c
v: v3
  • Loading branch information
Kim, Milo authored and Anton Vorontsov committed Jan 6, 2013
1 parent 6229b12 commit c95ecf7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 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: 05ac539b4fb4f7d7d0f3123c5bb81a4b34aa5327
refs/heads/master: d5c2b14cb2b9b6a099e22f39ae2196a8403994e9
12 changes: 6 additions & 6 deletions trunk/drivers/power/lp8788-charger.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ static inline bool lp8788_is_valid_charger_register(u8 addr)
return addr >= LP8788_CHG_START && addr <= LP8788_CHG_END;
}

static int lp8788_update_charger_params(struct lp8788_charger *pchg)
static int lp8788_update_charger_params(struct platform_device *pdev,
struct lp8788_charger *pchg)
{
struct lp8788 *lp = pchg->lp;
struct lp8788_charger_platform_data *pdata = pchg->pdata;
Expand All @@ -376,7 +377,7 @@ static int lp8788_update_charger_params(struct lp8788_charger *pchg)
int ret;

if (!pdata || !pdata->chg_params) {
dev_info(lp->dev, "skip updating charger parameters\n");
dev_info(&pdev->dev, "skip updating charger parameters\n");
return 0;
}

Expand Down Expand Up @@ -537,7 +538,6 @@ static int lp8788_set_irqs(struct platform_device *pdev,
static int lp8788_irq_register(struct platform_device *pdev,
struct lp8788_charger *pchg)
{
struct lp8788 *lp = pchg->lp;
const char *name[] = {
LP8788_CHG_IRQ, LP8788_PRSW_IRQ, LP8788_BATT_IRQ
};
Expand All @@ -550,13 +550,13 @@ static int lp8788_irq_register(struct platform_device *pdev,
for (i = 0; i < ARRAY_SIZE(name); i++) {
ret = lp8788_set_irqs(pdev, pchg, name[i]);
if (ret) {
dev_warn(lp->dev, "irq setup failed: %s\n", name[i]);
dev_warn(&pdev->dev, "irq setup failed: %s\n", name[i]);
return ret;
}
}

if (pchg->num_irqs > LP8788_MAX_CHG_IRQS) {
dev_err(lp->dev, "invalid total number of irqs: %d\n",
dev_err(&pdev->dev, "invalid total number of irqs: %d\n",
pchg->num_irqs);
return -EINVAL;
}
Expand Down Expand Up @@ -701,7 +701,7 @@ static int lp8788_charger_probe(struct platform_device *pdev)
pchg->pdata = lp->pdata ? lp->pdata->chg_pdata : NULL;
platform_set_drvdata(pdev, pchg);

ret = lp8788_update_charger_params(pchg);
ret = lp8788_update_charger_params(pdev, pchg);
if (ret)
return ret;

Expand Down

0 comments on commit c95ecf7

Please sign in to comment.