]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/video/mxsfb.c
video: mxsfb: simplify use of devm_ioremap_resource
[karo-tx-linux.git] / drivers / video / mxsfb.c
index 21223d475b39bb54aff2f58e95a73282f37754dd..91269f6eab8d9320c9be28fa777199b3eeb9cf63 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/clk.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
-#include <linux/pinctrl/consumer.h>
 #include <linux/fb.h>
 #include <linux/regulator/consumer.h>
 #include <video/of_display_timing.h>
@@ -877,18 +876,11 @@ static int mxsfb_probe(struct platform_device *pdev)
        struct mxsfb_info *host;
        struct fb_info *fb_info;
        struct fb_modelist *modelist;
-       struct pinctrl *pinctrl;
        int ret;
 
        if (of_id)
                pdev->id_entry = of_id->data;
 
-       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       if (!res) {
-               dev_err(&pdev->dev, "Cannot get memory IO resource\n");
-               return -ENODEV;
-       }
-
        fb_info = framebuffer_alloc(sizeof(struct mxsfb_info), &pdev->dev);
        if (!fb_info) {
                dev_err(&pdev->dev, "Failed to allocate fbdev\n");
@@ -897,9 +889,9 @@ static int mxsfb_probe(struct platform_device *pdev)
 
        host = to_imxfb_host(fb_info);
 
+       res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        host->base = devm_ioremap_resource(&pdev->dev, res);
        if (IS_ERR(host->base)) {
-               dev_err(&pdev->dev, "ioremap failed\n");
                ret = PTR_ERR(host->base);
                goto fb_release;
        }
@@ -909,12 +901,6 @@ static int mxsfb_probe(struct platform_device *pdev)
 
        host->devdata = &mxsfb_devdata[pdev->id_entry->driver_data];
 
-       pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
-       if (IS_ERR(pinctrl)) {
-               ret = PTR_ERR(pinctrl);
-               goto fb_release;
-       }
-
        host->clk = devm_clk_get(&host->pdev->dev, NULL);
        if (IS_ERR(host->clk)) {
                ret = PTR_ERR(host->clk);
@@ -986,8 +972,6 @@ static int mxsfb_remove(struct platform_device *pdev)
 
        framebuffer_release(fb_info);
 
-       platform_set_drvdata(pdev, NULL);
-
        return 0;
 }