Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma
[firefly-linux-kernel-4.4.55.git] / drivers / video / s3c-fb.c
index 1a00ad241edd3dcd10ac83e22d03a50c079920c6..968a62571df733e04fd1073c64cb30f6ad04807c 100644 (file)
@@ -1081,8 +1081,7 @@ static void s3c_fb_missing_pixclock(struct fb_videomode *mode)
  *
  * Allocate memory for the given framebuffer.
  */
-static int __devinit s3c_fb_alloc_memory(struct s3c_fb *sfb,
-                                        struct s3c_fb_win *win)
+static int s3c_fb_alloc_memory(struct s3c_fb *sfb, struct s3c_fb_win *win)
 {
        struct s3c_fb_pd_win *windata = win->windata;
        unsigned int real_size, virt_size, size;
@@ -1172,9 +1171,9 @@ static void s3c_fb_release_win(struct s3c_fb *sfb, struct s3c_fb_win *win)
  * Allocate and do the basic initialisation for one of the hardware's graphics
  * windows.
  */
-static int __devinit s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
-                                     struct s3c_fb_win_variant *variant,
-                                     struct s3c_fb_win **res)
+static int s3c_fb_probe_win(struct s3c_fb *sfb, unsigned int win_no,
+                           struct s3c_fb_win_variant *variant,
+                           struct s3c_fb_win **res)
 {
        struct fb_var_screeninfo *var;
        struct fb_videomode initmode;
@@ -1360,7 +1359,7 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win)
        }
 }
 
-static int __devinit s3c_fb_probe(struct platform_device *pdev)
+static int s3c_fb_probe(struct platform_device *pdev)
 {
        const struct platform_device_id *platid;
        struct s3c_fb_driverdata *fbdrv;
@@ -1422,10 +1421,9 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
        pm_runtime_enable(sfb->dev);
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-       sfb->regs = devm_request_and_ioremap(dev, res);
-       if (!sfb->regs) {
-               dev_err(dev, "failed to map registers\n");
-               ret = -ENXIO;
+       sfb->regs = devm_ioremap_resource(dev, res);
+       if (IS_ERR(sfb->regs)) {
+               ret = PTR_ERR(sfb->regs);
                goto err_lcd_clk;
        }
 
@@ -1521,7 +1519,7 @@ err_bus_clk:
  * Shutdown and then release all the resources that the driver allocated
  * on initialisation.
  */
-static int __devexit s3c_fb_remove(struct platform_device *pdev)
+static int s3c_fb_remove(struct platform_device *pdev)
 {
        struct s3c_fb *sfb = platform_get_drvdata(pdev);
        int win;
@@ -2035,7 +2033,7 @@ static const struct dev_pm_ops s3cfb_pm_ops = {
 
 static struct platform_driver s3c_fb_driver = {
        .probe          = s3c_fb_probe,
-       .remove         = __devexit_p(s3c_fb_remove),
+       .remove         = s3c_fb_remove,
        .id_table       = s3c_fb_driver_ids,
        .driver         = {
                .name   = "s3c-fb",