summaryrefslogtreecommitdiffstats
path: root/drivers/video/backlight/lp855x_bl.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-11-13 00:09:04 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-11-13 04:09:16 +0100
commitc512794cada491e008eeca822af7e4ad5db72a56 (patch)
tree08b65bb08c7387e45b6bc0d2c4b849ad6b921df5 /drivers/video/backlight/lp855x_bl.c
parentbacklight: lp8788: staticize 'default_bl_config' (diff)
downloadlinux-c512794cada491e008eeca822af7e4ad5db72a56.tar.xz
linux-c512794cada491e008eeca822af7e4ad5db72a56.zip
backlight: use dev_get_platdata()
Use the wrapper function for retrieving the platform data instead of accessing dev->platform_data directly. This is a cosmetic change to make the code simpler and enhance the readability. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/backlight/lp855x_bl.c')
-rw-r--r--drivers/video/backlight/lp855x_bl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c
index c952175d4113..57f005a9b475 100644
--- a/drivers/video/backlight/lp855x_bl.c
+++ b/drivers/video/backlight/lp855x_bl.c
@@ -405,7 +405,7 @@ static int lp855x_parse_dt(struct device *dev, struct device_node *node)
static int lp855x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
{
struct lp855x *lp;
- struct lp855x_platform_data *pdata = cl->dev.platform_data;
+ struct lp855x_platform_data *pdata = dev_get_platdata(&cl->dev);
struct device_node *node = cl->dev.of_node;
int ret;
@@ -414,7 +414,7 @@ static int lp855x_probe(struct i2c_client *cl, const struct i2c_device_id *id)
if (ret < 0)
return ret;
- pdata = cl->dev.platform_data;
+ pdata = dev_get_platdata(&cl->dev);
}
if (!i2c_check_functionality(cl->adapter, I2C_FUNC_SMBUS_I2C_BLOCK))