From patchwork Wed Oct 7 07:20:12 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lars Svensson X-Patchwork-Id: 7342951 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 23E019F32B for ; Wed, 7 Oct 2015 07:21:32 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5E7632061F for ; Wed, 7 Oct 2015 07:21:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 6A56820546 for ; Wed, 7 Oct 2015 07:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751377AbbJGHU0 (ORCPT ); Wed, 7 Oct 2015 03:20:26 -0400 Received: from seldrel01.sonyericsson.com ([37.139.156.2]:19370 "EHLO seldrel01.sonyericsson.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751084AbbJGHUZ (ORCPT ); Wed, 7 Oct 2015 03:20:25 -0400 From: Lars Svensson To: , , , CC: , , , , , Lars Svensson Subject: [PATCH v3 1/3] fb.h: Provide alternate screen_base pointer Date: Wed, 7 Oct 2015 09:20:12 +0200 Message-ID: <1444202414-21271-1-git-send-email-lars1.svensson@sonymobile.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- Patch v3: bugfix in fbtft-bus.c:fbtft_write_vmem16_bus9() in a separate commit. --- 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