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: 28968 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5FBF2203AC for ; Thu, 24 Apr 2014 12:35:50 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id wp4sf13833348obc.4 for ; Thu, 24 Apr 2014 05:35:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=hb63iCKzxJ/zhxT7iMtHH5G5bqjgqWWmnjUGyemFmFQ=; b=Kk899tYoT8MR2Sd8V6EyYAq6N9n28xsvz2ItubzL/p7k5lecs8emgI/eujKGOHQof/ CI3xJOPjIrN3OFsp6QsvjqAYc59Q9N1NsClr8XQo9rJUQNXGOVSmTLUsxidpYB86Bb9y Mlpkn+gGPRBr3ZUDGtwMVRyp92K6nTH6ctQDc9iLt65+NkocizW133FFCSQh3oPmf0WY 7KFr7rDo19t1zasHSMGHV0WV3+qqjp9Yq+lgyh3VdOf3DCV9aIJi9J0wwxC7DUvHdrkI r5geKiJNuB2giltcx09K9Hsml6PxPwa5+sdYodGYZLbd1pDgraj8qjtIGzbC8jRohblp 63qg== X-Gm-Message-State: ALoCoQmPSkh2hfgDIjWQFF+Ue/60g4wEsnMG99GMgrqR2rnPtxqdDZWunOwWXHUqsZPjSs+mAADa X-Received: by 10.50.70.66 with SMTP id k2mr4943146igu.7.1398342949651; Thu, 24 Apr 2014 05:35:49 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.36 with SMTP id y33ls1103579qgd.82.gmail; Thu, 24 Apr 2014 05:35:49 -0700 (PDT) X-Received: by 10.58.211.69 with SMTP id na5mr734528vec.30.1398342949480; Thu, 24 Apr 2014 05:35:49 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id dy7si884004vec.72.2014.04.24.05.35.49 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Apr 2014 05:35:49 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id ld13so2790045vcb.5 for ; Thu, 24 Apr 2014 05:35:49 -0700 (PDT) X-Received: by 10.221.50.70 with SMTP id vd6mr73570vcb.51.1398342949348; Thu, 24 Apr 2014 05:35:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp12367vcb; Thu, 24 Apr 2014 05:35:48 -0700 (PDT) X-Received: by 10.68.194.229 with SMTP id hz5mr64990050pbc.91.1398342948440; Thu, 24 Apr 2014 05:35:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qa3si2609879pbb.235.2014.04.24.05.35.47; Thu, 24 Apr 2014 05:35:47 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757153AbaDXMfb (ORCPT + 27 others); Thu, 24 Apr 2014 08:35:31 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:36101 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756815AbaDXMf1 (ORCPT ); Thu, 24 Apr 2014 08:35:27 -0400 Received: by mail-we0-f179.google.com with SMTP id x48so2152295wes.38 for ; Thu, 24 Apr 2014 05:35:26 -0700 (PDT) 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-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: peter.griffin@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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)