From patchwork Thu Mar 12 12:32:47 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hao X-Patchwork-Id: 449450 X-Patchwork-Delegate: michael@ellerman.id.au Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 895F7140119 for ; Thu, 12 Mar 2015 23:44:49 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=xFGt3S4I; dkim-adsp=none (unprotected policy); dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3E6C11A0C55 for ; Thu, 12 Mar 2015 23:44:49 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="verification failed; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=xFGt3S4I; dkim-adsp=none (unprotected policy); dkim-atps=neutral X-Original-To: linuxppc-dev@lists.ozlabs.org Delivered-To: linuxppc-dev@lists.ozlabs.org Received: from mail-yk0-x233.google.com (mail-yk0-x233.google.com [IPv6:2607:f8b0:4002:c07::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 6268E1A0981 for ; Thu, 12 Mar 2015 23:33:27 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=pass reason="2048-bit key; unprotected key" header.d=gmail.com header.i=@gmail.com header.b=xFGt3S4I; dkim-adsp=pass; dkim-atps=neutral Received: by ykbq200 with SMTP id q200so7170439ykb.10 for ; Thu, 12 Mar 2015 05:33:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=TCVGOzoIBZkbMqeUP5iWsM4VLejcJX+qY4vxSQCzFjs=; b=xFGt3S4Ik0JMY0ynyNcuEL7EULKGzDeF+cpRTr0Eg0M0tOv3gBtOW5X+4OCGtYsQ0N BGvgLcC3zw5VIHM0fn5/Sg3o2LniWrzFnwZT/EJEluEm4srNJZEjJ/bXTfX6dSL1nw1m +gpT5XKSV/IGEIRxR7emK2fNYhx2kzBMBanNWdDLm1SPnhbZ3OZrqXV3TDcxI7MGlHtU NPhZ5SZiZ8D10jxJNpGUPzsYsRfwwkszBjJ4P+yRrUis9H9DtyVXo+ZkQdmMaV3wtyUA 6KeXjldbBLDbQ43jX/goOdZWrcKhR4TZGrd0EjhFknmesWGZnlH+yMFqfr0WOugf5ou2 qnPw== X-Received: by 10.236.227.166 with SMTP id d36mr40964535yhq.185.1426163605199; Thu, 12 Mar 2015 05:33:25 -0700 (PDT) Received: from pek-khao-d1.corp.ad.wrs.com ([106.120.101.38]) by mx.google.com with ESMTPSA id a74sm5317686yhq.31.2015.03.12.05.33.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Mar 2015 05:33:24 -0700 (PDT) From: Kevin Hao To: Michael Ellerman Subject: [PATCH v3 6/9] fbdev: riva: remove the dependency on PPC_OF Date: Thu, 12 Mar 2015 20:32:47 +0800 Message-Id: <1426163570-10281-7-git-send-email-haokexin@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1426163570-10281-1-git-send-email-haokexin@gmail.com> References: <1426163570-10281-1-git-send-email-haokexin@gmail.com> Cc: linuxppc-dev@lists.ozlabs.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: "Linuxppc-dev" The OF functionality has moved to a common place and be used by many archs. So we don't need to include the ppc arch specific header files and depend on PPC_OF option any more. This is a preparation for killing PPC_OF. Signed-off-by: Kevin Hao Acked-by: Benjamin Herrenschmidt Acked-by: Tomi Valkeinen --- drivers/video/fbdev/riva/fbdev.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/drivers/video/fbdev/riva/fbdev.c b/drivers/video/fbdev/riva/fbdev.c index be73727c7227..294a80908c8c 100644 --- a/drivers/video/fbdev/riva/fbdev.c +++ b/drivers/video/fbdev/riva/fbdev.c @@ -44,10 +44,6 @@ #ifdef CONFIG_MTRR #include #endif -#ifdef CONFIG_PPC_OF -#include -#include -#endif #ifdef CONFIG_PMAC_BACKLIGHT #include #include @@ -1735,7 +1731,6 @@ static int riva_set_fbinfo(struct fb_info *info) return (rivafb_check_var(&info->var, info)); } -#ifdef CONFIG_PPC_OF static int riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) { struct riva_par *par = info->par; @@ -1766,9 +1761,8 @@ static int riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd) NVTRACE_LEAVE(); return 0; } -#endif /* CONFIG_PPC_OF */ -#if defined(CONFIG_FB_RIVA_I2C) && !defined(CONFIG_PPC_OF) +#if defined(CONFIG_FB_RIVA_I2C) static int riva_get_EDID_i2c(struct fb_info *info) { struct riva_par *par = info->par; @@ -1828,10 +1822,13 @@ static void riva_update_default_var(struct fb_var_screeninfo *var, static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev) { NVTRACE_ENTER(); -#ifdef CONFIG_PPC_OF - if (!riva_get_EDID_OF(info, pdev)) + if (riva_get_EDID_OF(info, pdev)) { + NVTRACE_LEAVE(); + return; + } + if (IS_ENABLED(CONFIG_OF)) printk(PFX "could not retrieve EDID from OF\n"); -#elif defined(CONFIG_FB_RIVA_I2C) +#if defined(CONFIG_FB_RIVA_I2C) if (!riva_get_EDID_i2c(info)) printk(PFX "could not retrieve EDID from DDC/I2C\n"); #endif