From patchwork Thu Apr 24 12:28:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Griffin X-Patchwork-Id: 4050481 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 28DEEBFF02 for ; Thu, 24 Apr 2014 12:36:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 4D1292018A for ; Thu, 24 Apr 2014 12:36:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7B36520145 for ; Thu, 24 Apr 2014 12:36:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756997AbaDXMfa (ORCPT ); Thu, 24 Apr 2014 08:35:30 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:36662 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753979AbaDXMf1 (ORCPT ); Thu, 24 Apr 2014 08:35:27 -0400 Received: by mail-we0-f179.google.com with SMTP id x48so2200526wes.10 for ; Thu, 24 Apr 2014 05:35:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=xuJgQ9EeGBHppIiQvAR+RTB0GIyP8ekVMN1E9Ckj+7I=; b=g11B9YSTENBL8qayuK0xA7E5c+hEDNVBJ8mtydDlV+8+IsM63Ho8whAdheRZyVb2vY auMtfCQa05KbCtq3q7ajuryAPDqEvqK8DlGVZzwW719R4iDVMS1AzPLxEKHFvtwX1nn6 aanI774stz6tJUpLVWHuoFUQNgyDBHgK+CI/lEteMjEhtPsdlExzUaJh5EoBO5JOdE8P RcR+CqnIKTZg6tbJCj13kALFFzqxhaUKFBobepA8vtYa2XvpK0/8+tohkvx4gu8/wAhG GVrZHU180rww664oa/244Yo+gzegwTNcomXQAjhunGqbea2skrQc35yoVmEa+KzLj/2B E/Hg== X-Gm-Message-State: ALoCoQl7ahPV1wV8eWCmBSEmtXC4ed41D9dDS8gywmTYq8NS/+lNq+mTYjHpYJ8cOe74aeJSCY3L X-Received: by 10.180.80.69 with SMTP id p5mr2654853wix.54.1398342926386; Thu, 24 Apr 2014 05:35:26 -0700 (PDT) Received: from localhost.localdomain (cpc14-aztw22-2-0-cust189.18-1.cable.virginm.net. [82.45.1.190]) by mx.google.com with ESMTPSA id y20sm35144777wiv.14.2014.04.24.05.35.25 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 05:35:25 -0700 (PDT) From: Peter Griffin To: linux-kernel@vger.kernel.org Cc: linaro-kernel@lists.linaro.org, Arnd Bergmann , Peter Griffin , Jean-Christophe Plagniol-Villard , Tomi Valkeinen , linux-fbdev@vger.kernel.org, Raphael Assenat , Mike Rapoport Subject: [PATCH 05/13] video/mbx: fix building debugfs support Date: Thu, 24 Apr 2014 13:28:21 +0100 Message-Id: <1398342509-10243-6-git-send-email-peter.griffin@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1398342509-10243-1-git-send-email-peter.griffin@linaro.org> References: <1398342509-10243-1-git-send-email-peter.griffin@linaro.org> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 From: Arnd Bergmann The mbx framebuffer debugfs support apparently hasn't been able to build for a long time, at least since 2006 when the u.generic_ip field in the inode was removed. This fixes the obvious bug, and also makes it possible to build the driver as a module when debugfs support is enabled, by simply including the C file. It's ugly, but it won't make the driver any worse than it already is, and doesn't require a more invasive change that might break it further. Signed-off-by: Arnd Bergmann Signed-off-by: Peter Griffin Cc: Jean-Christophe Plagniol-Villard Cc: Tomi Valkeinen Cc: linux-fbdev@vger.kernel.org Cc: Raphael Assenat Cc: Mike Rapoport --- drivers/video/fbdev/mbx/Makefile | 3 +-- drivers/video/fbdev/mbx/mbxdebugfs.c | 2 +- drivers/video/fbdev/mbx/mbxfb.c | 2 ++ 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/mbx/Makefile b/drivers/video/fbdev/mbx/Makefile index 16c1165..d7ae5a9 100644 --- a/drivers/video/fbdev/mbx/Makefile +++ b/drivers/video/fbdev/mbx/Makefile @@ -1,4 +1,3 @@ # Makefile for the 2700G controller driver. -obj-$(CONFIG_FB_MBX) += mbxfb.o -obj-$(CONFIG_FB_MBX_DEBUG) += mbxfbdebugfs.o +obj-y += mbxfb.o diff --git a/drivers/video/fbdev/mbx/mbxdebugfs.c b/drivers/video/fbdev/mbx/mbxdebugfs.c index 4449f24..e3bc00a 100644 --- a/drivers/video/fbdev/mbx/mbxdebugfs.c +++ b/drivers/video/fbdev/mbx/mbxdebugfs.c @@ -17,7 +17,7 @@ struct mbxfb_debugfs_data { static int open_file_generic(struct inode *inode, struct file *file) { - file->private_data = inode->u.generic_ip; + file->private_data = inode->i_private; return 0; } diff --git a/drivers/video/fbdev/mbx/mbxfb.c b/drivers/video/fbdev/mbx/mbxfb.c index f0a5392..2bd52ed 100644 --- a/drivers/video/fbdev/mbx/mbxfb.c +++ b/drivers/video/fbdev/mbx/mbxfb.c @@ -877,6 +877,8 @@ static int mbxfb_resume(struct platform_device *dev) #ifndef CONFIG_FB_MBX_DEBUG #define mbxfb_debugfs_init(x) do {} while(0) #define mbxfb_debugfs_remove(x) do {} while(0) +#else +#include "mbxdebugfs.c" #endif #define res_size(_r) (((_r)->end - (_r)->start) + 1)