fb.h: Provide alternate screen_base pointer
authorLars Svensson <lars1.svensson@sonymobile.com>
Wed, 7 Oct 2015 07:20:12 +0000 (09:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 17:51:30 +0000 (10:51 -0700)
Some drivers use member screen_base of struct fb_info to store non-
__iomem pointers, creating the need for ugly __force typecasts to
avoid sparse warnings. This adds an alternate pointer without the
__iomem qualifyer for this use.

Signed-off-by: Lars Svensson <lars1.svensson@sonymobile.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/fb.h

index bc9afa74ee11cb3f7c2876280aad4da50ad6df7b..41a3b11f77962dc7a021711a54c22c71fb737a11 100644 (file)
@@ -483,7 +483,10 @@ struct fb_info {
 #ifdef CONFIG_FB_TILEBLITTING
        struct fb_tile_ops *tileops;    /* Tile Blitting */
 #endif
-       char __iomem *screen_base;      /* Virtual address */
+       union {
+               char __iomem *screen_base;      /* Virtual address */
+               char *screen_buffer;
+       };
        unsigned long screen_size;      /* Amount of ioremapped VRAM or 0 */ 
        void *pseudo_palette;           /* Fake palette of 16 colors */ 
 #define FBINFO_STATE_RUNNING   0