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>
This commit is contained in:

committed by
Linus Torvalds

parent
1f299997b4
commit
c512794cad
@@ -79,7 +79,7 @@ static const struct backlight_ops genericbl_ops = {
|
||||
static int genericbl_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct backlight_properties props;
|
||||
struct generic_bl_info *machinfo = pdev->dev.platform_data;
|
||||
struct generic_bl_info *machinfo = dev_get_platdata(&pdev->dev);
|
||||
const char *name = "generic-bl";
|
||||
struct backlight_device *bd;
|
||||
|
||||
|
Reference in New Issue
Block a user