video: imxfb: use dev_get_platdata()
authorJingoo Han <jg1.han@samsung.com>
Tue, 17 Sep 2013 05:08:58 +0000 (14:08 +0900)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 20 Sep 2013 09:22:03 +0000 (12:22 +0300)
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: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/imxfb.c

index 38733ac2b6981682cd318f16f17d2784f64d9962..44ee678481d5680571c7d0cb4b990b128e7c052b 100644 (file)
@@ -755,7 +755,7 @@ static int imxfb_resume(struct platform_device *dev)
 
 static int imxfb_init_fbinfo(struct platform_device *pdev)
 {
-       struct imx_fb_platform_data *pdata = pdev->dev.platform_data;
+       struct imx_fb_platform_data *pdata = dev_get_platdata(&pdev->dev);
        struct fb_info *info = dev_get_drvdata(&pdev->dev);
        struct imxfb_info *fbi = info->par;
        struct device_node *np;
@@ -877,7 +877,7 @@ static int imxfb_probe(struct platform_device *pdev)
        if (!res)
                return -ENODEV;
 
-       pdata = pdev->dev.platform_data;
+       pdata = dev_get_platdata(&pdev->dev);
 
        info = framebuffer_alloc(sizeof(struct imxfb_info), &pdev->dev);
        if (!info)
@@ -1066,7 +1066,7 @@ static int imxfb_remove(struct platform_device *pdev)
 #endif
        unregister_framebuffer(info);
 
-       pdata = pdev->dev.platform_data;
+       pdata = dev_get_platdata(&pdev->dev);
        if (pdata && pdata->exit)
                pdata->exit(fbi->pdev);