aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/leds/leds-da9052.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-da9052.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-da9052.c')
-rw-r--r--drivers/leds/leds-da9052.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/leds/leds-da9052.c b/drivers/leds/leds-da9052.c
index efec43344e9f..865d4faf874a 100644
--- a/drivers/leds/leds-da9052.c
+++ b/drivers/leds/leds-da9052.c
@@ -112,7 +112,7 @@ static int da9052_led_probe(struct platform_device *pdev)
112 int i; 112 int i;
113 113
114 da9052 = dev_get_drvdata(pdev->dev.parent); 114 da9052 = dev_get_drvdata(pdev->dev.parent);
115 pdata = da9052->dev->platform_data; 115 pdata = dev_get_platdata(da9052->dev);
116 if (pdata == NULL) { 116 if (pdata == NULL) {
117 dev_err(&pdev->dev, "No platform data\n"); 117 dev_err(&pdev->dev, "No platform data\n");
118 goto err; 118 goto err;
@@ -185,7 +185,7 @@ static int da9052_led_remove(struct platform_device *pdev)
185 int i; 185 int i;
186 186
187 da9052 = dev_get_drvdata(pdev->dev.parent); 187 da9052 = dev_get_drvdata(pdev->dev.parent);
188 pdata = da9052->dev->platform_data; 188 pdata = dev_get_platdata(da9052->dev);
189 pled = pdata->pled; 189 pled = pdata->pled;
190 190
191 for (i = 0; i < pled->num_leds; i++) { 191 for (i = 0; i < pled->num_leds; i++) {