Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 333076
b: refs/heads/master
c: 56a1e9a
h: refs/heads/master
v: v3
  • Loading branch information
Kim, Milo authored and Bryan Wu committed Sep 11, 2012
1 parent e59e3b2 commit c80e32d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 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: 27d7704e5ebf0bc0cba86508023dd484639a48de
refs/heads/master: 56a1e9adc83870ae9ad9ff1bf9fd8bccebdfe065
10 changes: 6 additions & 4 deletions trunk/drivers/leds/leds-lp5523.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,7 +833,8 @@ static int __init lp5523_init_engine(struct lp5523_engine *engine, int id)
}

static int __devinit lp5523_init_led(struct lp5523_led *led, struct device *dev,
int chan, struct lp5523_platform_data *pdata)
int chan, struct lp5523_platform_data *pdata,
const char *chip_name)
{
char name[32];
int res;
Expand All @@ -856,7 +857,7 @@ static int __devinit lp5523_init_led(struct lp5523_led *led, struct device *dev,
led->cdev.name = pdata->led_config[chan].name;
} else {
snprintf(name, sizeof(name), "%s:channel%d",
pdata->label ?: "lp5523", chan);
pdata->label ? : chip_name, chan);
led->cdev.name = name;
}

Expand Down Expand Up @@ -927,7 +928,7 @@ static int __devinit lp5523_probe(struct i2c_client *client,
if (ret)
goto fail1;

dev_info(&client->dev, "LP5523 Programmable led chip found\n");
dev_info(&client->dev, "%s Programmable led chip found\n", id->name);

/* Initialize engines */
for (i = 0; i < ARRAY_SIZE(chip->engines); i++) {
Expand Down Expand Up @@ -955,7 +956,8 @@ static int __devinit lp5523_probe(struct i2c_client *client,
INIT_WORK(&chip->leds[led].brightness_work,
lp5523_led_brightness_work);

ret = lp5523_init_led(&chip->leds[led], &client->dev, i, pdata);
ret = lp5523_init_led(&chip->leds[led], &client->dev, i, pdata,
id->name);
if (ret) {
dev_err(&client->dev, "error initializing leds\n");
goto fail2;
Expand Down

0 comments on commit c80e32d

Please sign in to comment.