[PATCH] Remove some code when ! CONFIG_PCI

From: Cesar Eduardo Barros (cesarb@nitnet.com.br)
Date: Sun Jul 09 2000 - 18:58:20 EST


This patch removes some unneeded code when CONFIG_PCI is not defines.

There is more to remove; someone else should check and fix.

(nobody uses ISA-only machines anymore :( )

--- linux-2.4.0-test3-pre7/drivers/parport/parport_pc.c Sun Jul 9 19:32:07 2000
+++ linux-2.4.0-test3-pre7.fixed/drivers/parport/parport_pc.c Sun Jul 9 20:52:24 2000
@@ -2174,7 +2174,7 @@
         return p;
 }
 
-
+#ifdef CONFIG_PCI
 /* Via support maintained by Jeff Garzik <jgarzik@mandrakesoft.com> */
 static int __devinit sio_via_686a_probe (struct pci_dev *pdev)
 {
@@ -2266,20 +2266,24 @@
                 port1, irq, dma);
         return 0;
 }
-
+#endif
 
 enum parport_pc_sio_types {
         sio_via_686a = 0, /* Via VT82C686A motherboard Super I/O */
         last_sio
 };
 
+/* Quick-and-dirty fix. Someone needs to ifdef-out the enum above, the PCI
+ * table below and the PCI devices id table when CONFIG_PCI is not defined.
+ * Doing so would save a good amount of memory. */
+#ifdef CONFIG_PCI
 /* each element directly indexed from enum list, above */
 static struct parport_pc_superio {
         int (*probe) (struct pci_dev *pdev);
 } parport_pc_superio_info[] __devinitdata = {
         { sio_via_686a_probe, },
 };
-
+#endif
 
 enum parport_pc_pci_cards {
         siig_1s1p_10x_550 = last_sio,

-- 
Cesar Eduardo Barros
cesarb@nitnet.com.br
cesarb@dcc.ufrj.br

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jul 15 2000 - 21:00:10 EST