Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333084
b: refs/heads/master
c: e76a322
h: refs/heads/master
v: v3
  • Loading branch information
Axel Lin authored and Bryan Wu committed Sep 24, 2012
1 parent 83833a7 commit 6569186
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 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: 8b7cfbec052d3a0b8e8c7de24a6b5f00d340e193
refs/heads/master: e76a322af16ba7be9b303239352e140209bf3822
15 changes: 3 additions & 12 deletions trunk/drivers/leds/leds-lm3642.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,14 @@ struct lm3642_chip_data {
/* chip initialize */
static int __devinit lm3642_chip_init(struct lm3642_chip_data *chip)
{
unsigned int reg_val;
int ret;
struct lm3642_platform_data *pdata = chip->pdata;

/* set enable register */
ret = regmap_read(chip->regmap, REG_ENABLE, &reg_val);
ret = regmap_update_bits(chip->regmap, REG_ENABLE, EX_PIN_ENABLE_MASK,
pdata->tx_pin);
if (ret < 0)
goto out;

reg_val &= (~EX_PIN_ENABLE_MASK);
reg_val |= pdata->tx_pin;
ret = regmap_write(chip->regmap, REG_ENABLE, reg_val);
if (ret < 0)
goto out;

out:
dev_err(chip->dev, "Failed to read REG_ENABLE Register\n");
dev_err(chip->dev, "Failed to update REG_ENABLE Register\n");
return ret;
}

Expand Down

0 comments on commit 6569186

Please sign in to comment.