Skip to contentSkip to conversation

avoid riva_get_EDID unused variable warnings

PATCH New Christoph Hellwig 1 participant 1 message Aug 14, 2004 Framebuffer layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 avoid riva_get_EDID unused variable warnings

split the three versions of the function into separate blocks, makes the code much cleaner aswell.

drivers/video/riva/fbdev.c +15 -10
@@ -1860,20 +1860,22 @@
 	var->accel_flags |= FB_ACCELF_TEXT;
 	NVTRACE_LEAVE();
 }
-
-
+#ifdef CONFIG_PPC_OF
 static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev)
 {
-	struct riva_par *par;
-	int i;
-
 	NVTRACE_ENTER();
-#ifdef CONFIG_PPC_OF
 	if (!riva_get_EDID_OF(info, pdev))
 		printk("rivafb: could not retrieve EDID from OF\n");
+	NVTRACE_LEAVE();
+}
 #else
-	/* XXX use other methods later */
 #ifdef CONFIG_FB_RIVA_I2C
+static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev)
+{
+	struct riva_par *par;
+	int i;
+
+	NVTRACE_ENTER();
 
 	par = (struct riva_par *) info->par;
 	riva_create_i2c_busses(par);
@@ -1885,11 +1887,14 @@
 		}
 	}
 	riva_delete_i2c_busses(par);
-#endif
-#endif
 	NVTRACE_LEAVE();
 }
-
+#else
+static void riva_get_EDID(struct fb_info *info, struct pci_dev *pdev)
+{
+}
+#endif
+#endif
 
 static void riva_get_edidinfo(struct fb_info *info)
 {