summaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp5521.c
diff options
context:
space:
mode:
authorMilo(Woogyom) Kim <milo.kim@ti.com>2013-02-05 18:02:26 +0900
committerBryan Wu <cooloney@gmail.com>2013-02-06 15:59:26 -0800
commit945c700746cbfa3375bf88123c2cf6c210f4cc2c (patch)
treeec7818d95c466ca92a70aedfb43dde216f77fed7 /drivers/leds/leds-lp5521.c
parentc93d08fa75020835741c7b1d0523ff854e8acde1 (diff)
downloadlinux-945c700746cbfa3375bf88123c2cf6c210f4cc2c.tar.bz2
leds-lp55xx: replace name of data structure
Change the name of chip data structure and platform data. This patch is a preceding step for cleaning up lp5521/5523 probe and remove. These data will be replaced with new lp55xx common data structures in next patch. Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lp5521.c')
-rw-r--r--drivers/leds/leds-lp5521.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index e042a094a07f..8ef8f44bf86e 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -872,35 +872,35 @@ static void lp5521_unregister_leds(struct lp5521_chip *chip)
static int lp5521_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
- struct lp5521_chip *chip;
- struct lp5521_platform_data *pdata;
+ struct lp5521_chip *old_chip;
+ struct lp5521_platform_data *old_pdata;
int ret;
- chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
- if (!chip)
+ old_chip = devm_kzalloc(&client->dev, sizeof(*old_chip), GFP_KERNEL);
+ if (!old_chip)
return -ENOMEM;
- i2c_set_clientdata(client, chip);
- chip->client = client;
+ i2c_set_clientdata(client, old_chip);
+ old_chip->client = client;
- pdata = client->dev.platform_data;
+ old_pdata = client->dev.platform_data;
- if (!pdata) {
+ if (!old_pdata) {
dev_err(&client->dev, "no platform data\n");
return -EINVAL;
}
- mutex_init(&chip->lock);
+ mutex_init(&old_chip->lock);
- chip->pdata = pdata;
+ old_chip->pdata = old_pdata;
- ret = lp5521_init_device(chip);
+ ret = lp5521_init_device(old_chip);
if (ret)
goto err_init;
dev_info(&client->dev, "%s programmable led chip found\n", id->name);
- ret = lp5521_register_leds(chip);
+ ret = lp5521_register_leds(old_chip);
if (ret)
goto fail2;
@@ -911,22 +911,22 @@ static int lp5521_probe(struct i2c_client *client,
}
return ret;
fail2:
- lp5521_unregister_leds(chip);
- lp5521_deinit_device(chip);
+ lp5521_unregister_leds(old_chip);
+ lp5521_deinit_device(old_chip);
err_init:
return ret;
}
static int lp5521_remove(struct i2c_client *client)
{
- struct lp5521_chip *chip = i2c_get_clientdata(client);
+ struct lp5521_chip *old_chip = i2c_get_clientdata(client);
- lp5521_run_led_pattern(PATTERN_OFF, chip);
+ lp5521_run_led_pattern(PATTERN_OFF, old_chip);
lp5521_unregister_sysfs(client);
- lp5521_unregister_leds(chip);
+ lp5521_unregister_leds(old_chip);
- lp5521_deinit_device(chip);
+ lp5521_deinit_device(old_chip);
return 0;
}