linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] fb.h: Provide alternate screen_base pointer
@ 2015-10-06  7:02 Lars Svensson
  2015-10-06  7:02 ` [PATCH 2/2] staging: fbtft: fix sparse warning in call to vfree() Lars Svensson
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Svensson @ 2015-10-06  7:02 UTC (permalink / raw)
  To: thomas.petazzoni, noralf, plagnioj, tomi.valkeinen
  Cc: linux-fbdev, gregkh, devel, linux-kernel, dan.carpenter,
	Lars Svensson

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>
---
New version of my previous patch, reworked as suggested by Dan
Carpenter. For the name of the pointer, "screen_buffer" was the
best I could come up with. Other suggestions?

//Lars
---
 include/linux/fb.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/include/linux/fb.h b/include/linux/fb.h
index bc9afa7..41a3b11 100644
--- a/include/linux/fb.h
+++ b/include/linux/fb.h
@@ -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
-- 
2.4.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-10-06  7:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06  7:02 [PATCH 1/2] fb.h: Provide alternate screen_base pointer Lars Svensson
2015-10-06  7:02 ` [PATCH 2/2] staging: fbtft: fix sparse warning in call to vfree() Lars Svensson
2015-10-06  7:18   ` Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).