]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
goldfish-framebuffer-driver-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 20 Feb 2013 02:13:37 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:05 +0000 (16:52 +1100)
fix (silly) sparse warnings

Cc: Alan Cox <alan@linux.intel.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Bruce Beare <bruce.j.beare@intel.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Jun Nakajima <jun.nakajima@intel.com>
Cc: Mike A. Chan <mikechan@google.com>
Cc: Sheng Yang <sheng@linux.intel.com>
Cc: Tom Keel <thomas.keel@intel.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Xiaohui Xin <xiaohui.xin@intel.com>
Cc: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/video/goldfishfb.c

index f7f5c296e10417568da85ebbc3b6b442466c8049..489abb32fc04acbb1b6bedf2ce6cacb74cd1f89b 100644 (file)
@@ -244,11 +244,12 @@ static int goldfish_fb_probe(struct platform_device *pdev)
        fb->fb.var.blue.length = 5;
 
        framesize = width * height * 2 * 2;
-       fb->fb.screen_base = dma_alloc_coherent(&pdev->dev, framesize,
+       fb->fb.screen_base = (char __force __iomem *)dma_alloc_coherent(
+                                               &pdev->dev, framesize,
                                                &fbpaddr, GFP_KERNEL);
        pr_debug("allocating frame buffer %d * %d, got %p\n",
                                        width, height, fb->fb.screen_base);
-       if (fb->fb.screen_base == 0) {
+       if (fb->fb.screen_base == NULL) {
                ret = -ENOMEM;
                goto err_alloc_screen_base_failed;
        }
@@ -277,7 +278,8 @@ err_register_framebuffer_failed:
 err_request_irq_failed:
 err_fb_set_var_failed:
        dma_free_coherent(&pdev->dev, framesize,
-                               fb->fb.screen_base, fb->fb.fix.smem_start);
+                               (void *)fb->fb.screen_base,
+                               fb->fb.fix.smem_start);
 err_alloc_screen_base_failed:
 err_no_irq:
        iounmap(fb->reg_base);
@@ -296,7 +298,7 @@ static int goldfish_fb_remove(struct platform_device *pdev)
        unregister_framebuffer(&fb->fb);
        free_irq(fb->irq, fb);
 
-       dma_free_coherent(&pdev->dev, framesize, fb->fb.screen_base,
+       dma_free_coherent(&pdev->dev, framesize, (void *)fb->fb.screen_base,
                                                fb->fb.fix.smem_start);
        iounmap(fb->reg_base);
        return 0;