public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] smaller parport_pc for non-PCI boxes
@ 2001-03-01  7:12 Paul Gortmaker
  2001-03-01  9:23 ` Paul Gortmaker
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Gortmaker @ 2001-03-01  7:12 UTC (permalink / raw)
  To: linux-kernel list; +Cc: linux-parport


There is quite a bit of PCI stuff that gets compiled into parport_pc.c
even when CONFIG_PCI isn't enabled.  This patch cuts down the size quite 
a bit (more than 4k off the object, about 1k off the zImage) for the 
older non-PCI machines which are typically resource starved anyway... 

Patch is against 2.4.2

Paul.


--- drivers/parport/parport_pc.c~	Wed Feb 14 02:41:01 2001
+++ drivers/parport/parport_pc.c	Thu Mar  1 00:54:19 2001
@@ -11,6 +11,7 @@
  * Cleaned up include files - Russell King <linux@arm.uk.linux.org>
  * DMA support - Bert De Jonghe <bert@sophis.be>
  * Many ECP bugs fixed.  Fred Barnes & Jamie Lokier, 1999
+ * More PCI support now conditional on CONFIG_PCI, 03/2001, Paul G. 
  */
 
 /* This driver should work with any hardware that is broadly compatible
@@ -2182,6 +2183,7 @@
 }
 
 
+#ifdef CONFIG_PCI
 /* Via support maintained by Jeff Garzik <jgarzik@mandrakesoft.com> */
 static int __devinit sio_via_686a_probe (struct pci_dev *pdev)
 {
@@ -2547,7 +2549,6 @@
 
 static int __init parport_pc_init_superio (void)
 {
-#ifdef CONFIG_PCI
 	const struct pci_device_id *id;
 	struct pci_dev *pdev;
 
@@ -2558,10 +2559,13 @@
 
 		return parport_pc_superio_info[id->driver_data].probe (pdev);
 	}
-#endif /* CONFIG_PCI */
 
 	return 0; /* zero devices found */
 }
+#else
+static struct pci_driver parport_pc_pci_driver;
+static int __init parport_pc_init_superio(void) {return 0;}
+#endif /* CONFIG_PCI */
 
 /* This is called by parport_pc_find_nonpci_ports (in asm/parport.h) */
 static int __init __attribute__((unused))



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] smaller parport_pc for non-PCI boxes
  2001-03-01  7:12 [PATCH] smaller parport_pc for non-PCI boxes Paul Gortmaker
@ 2001-03-01  9:23 ` Paul Gortmaker
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Gortmaker @ 2001-03-01  9:23 UTC (permalink / raw)
  To: linux-kernel list, linux-parport

Forgot to mention that the patch also fixes the warning: 

	`parport_pc_superio_info' defined but not used

for non-PCI, which was the original reason why I was poking around in there.

Paul.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-01  9:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-03-01  7:12 [PATCH] smaller parport_pc for non-PCI boxes Paul Gortmaker
2001-03-01  9:23 ` Paul Gortmaker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox