linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Hao <haokexin@gmail.com>
To: linuxppc-dev@lists.ozlabs.org, linux-fbdev@vger.kernel.org
Cc: Kevin Hao <haokexin@gmail.com>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>,
	Antonino Daplas <adaplas@gmail.com>
Subject: [PATCH 07/15] fbdev: riva: remove the dependency on PPC_OF
Date: Sat, 31 Jan 2015 21:47:37 +0800	[thread overview]
Message-ID: <1422712065-9403-8-git-send-email-haokexin@gmail.com> (raw)
In-Reply-To: <1422712065-9403-1-git-send-email-haokexin@gmail.com>

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 <haokexin@gmail.com>
---
 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 <asm/mtrr.h>
 #endif
-#ifdef CONFIG_PPC_OF
-#include <asm/prom.h>
-#include <asm/pci-bridge.h>
-#endif
 #ifdef CONFIG_PMAC_BACKLIGHT
 #include <asm/machdep.h>
 #include <asm/backlight.h>
@@ -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
-- 
1.9.3

  parent reply	other threads:[~2015-01-31 13:48 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-31 13:47 [PATCH 00/15] powerpc: kill PPC_OF Kevin Hao
2015-01-31 13:47 ` [PATCH 01/15] PCI: introduce pci_device_to_OF_node() for !CONFIG_OF Kevin Hao
2015-02-02  2:28   ` Michael Ellerman
2015-02-02 15:47     ` Bjorn Helgaas
2015-02-03  0:25       ` Michael Ellerman
2015-02-03  1:37         ` [PATCH v2 01/15] PCI: Add pci_device_to_OF_node() stub " Kevin Hao
2015-02-03 15:31           ` Bjorn Helgaas
2015-02-03 15:29         ` [PATCH 01/15] PCI: introduce pci_device_to_OF_node() " Bjorn Helgaas
2015-02-03  1:02       ` Kevin Hao
2015-01-31 13:47 ` [PATCH 02/15] sata_svw: remove the dependency on PPC_OF Kevin Hao
2015-01-31 15:43   ` Tejun Heo
2015-01-31 13:47 ` [PATCH 03/15] fbdev: aty128fb: replace PPC_OF with PPC Kevin Hao
2015-02-27  0:11   ` Benjamin Herrenschmidt
2015-02-27  1:05     ` Kevin Hao
2015-02-27  2:05       ` Benjamin Herrenschmidt
2015-03-10 12:23       ` Tomi Valkeinen
2015-03-11  4:38         ` Kevin Hao
2015-03-11  7:51           ` Tomi Valkeinen
2015-01-31 13:47 ` [PATCH 04/15] fbdev: radeon: " Kevin Hao
2015-01-31 13:47 ` [PATCH 05/15] fbdev: imsttfb: remove the dependency on PPC_OF Kevin Hao
2015-02-01  2:44   ` Stephen Rothwell
2015-02-01  5:51     ` Kevin Hao
2015-02-03  2:20       ` Kevin Hao
2015-02-03  2:34         ` Stephen Rothwell
2015-02-03  2:34       ` Stephen Rothwell
2015-01-31 13:47 ` [PATCH 06/15] fbdev: nvidia: " Kevin Hao
2015-01-31 13:47 ` Kevin Hao [this message]
2015-01-31 13:47 ` [PATCH 08/15] fbdev: remove the unnecessary includes of ppc specific header files Kevin Hao
2015-01-31 13:47 ` [PATCH 09/15] fbdev: kconfig: replace PPC_OF with PPC Kevin Hao
2015-01-31 13:47 ` [PATCH 10/15] gpio: " Kevin Hao
2015-02-04 10:07   ` Linus Walleij
2015-01-31 13:47 ` [PATCH 11/15] mmc: " Kevin Hao
2015-01-31 13:47 ` [PATCH 12/15] mtd: " Kevin Hao
2015-02-06  4:08   ` Brian Norris
2015-01-31 13:47 ` [PATCH 13/15] tty: kconfig: remove the superfluous dependency on PPC_OF Kevin Hao
2015-01-31 13:47 ` [PATCH 14/15] usb: kconfig: replace PPC_OF with PPC Kevin Hao
2015-01-31 13:47 ` [PATCH 15/15] powerpc: kill PPC_OF Kevin Hao
2015-02-02  2:25 ` [PATCH 00/15] " Michael Ellerman
2015-02-02  2:42   ` Kevin Hao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1422712065-9403-8-git-send-email-haokexin@gmail.com \
    --to=haokexin@gmail.com \
    --cc=adaplas@gmail.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=plagnioj@jcrosoft.com \
    --cc=tomi.valkeinen@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).