aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-lp8501.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-07-30 04:07:35 -0400
committerBryan Wu <cooloney@gmail.com>2013-08-26 20:22:11 -0400
commit87aae1ea82f93f0f00cb955044ea1db3501cf233 (patch)
tree5230c5f9bf6e78259a61656d7065b3c4386afd02 /drivers/leds/leds-lp8501.c
parent8465b01827b7a1e0e2464b0a300618bf7add25d8 (diff)
leds: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Diffstat (limited to 'drivers/leds/leds-lp8501.c')
-rw-r--r--drivers/leds/leds-lp8501.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-lp8501.c b/drivers/leds/leds-lp8501.c
index 4573b9471aaa..8d55a780ca46 100644
--- a/drivers/leds/leds-lp8501.c
+++ b/drivers/leds/leds-lp8501.c
@@ -310,7 +310,7 @@ static int lp8501_probe(struct i2c_client *client,
310 struct lp55xx_platform_data *pdata; 310 struct lp55xx_platform_data *pdata;
311 struct device_node *np = client->dev.of_node; 311 struct device_node *np = client->dev.of_node;
312 312
313 if (!client->dev.platform_data) { 313 if (!dev_get_platdata(&client->dev)) {
314 if (np) { 314 if (np) {
315 ret = lp55xx_of_populate_pdata(&client->dev, np); 315 ret = lp55xx_of_populate_pdata(&client->dev, np);
316 if (ret < 0) 316 if (ret < 0)
@@ -320,7 +320,7 @@ static int lp8501_probe(struct i2c_client *client,
320 return -EINVAL; 320 return -EINVAL;
321 } 321 }
322 } 322 }
323 pdata = client->dev.platform_data; 323 pdata = dev_get_platdata(&client->dev);
324 324
325 chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL); 325 chip = devm_kzalloc(&client->dev, sizeof(*chip), GFP_KERNEL);
326 if (!chip) 326 if (!chip)