
From: Adrian Bunk <bunk@stusta.de>

This patch removes some completely unused code and makes some needlessly
global code static in drivers/pnp/isapnp/core.c .

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/pnp/isapnp/core.c |   47 ++++++++------------------------------
 25-akpm/include/linux/isapnp.h    |   20 ----------------
 2 files changed, 11 insertions(+), 56 deletions(-)

diff -puN drivers/pnp/isapnp/core.c~misc-isapnp-cleanups drivers/pnp/isapnp/core.c
--- 25/drivers/pnp/isapnp/core.c~misc-isapnp-cleanups	2005-01-18 20:59:48.994575544 -0800
+++ 25-akpm/drivers/pnp/isapnp/core.c	2005-01-18 20:59:49.002574328 -0800
@@ -52,9 +52,9 @@
 #endif
 
 int isapnp_disable;			/* Disable ISA PnP */
-int isapnp_rdp;				/* Read Data Port */
-int isapnp_reset = 1;			/* reset all PnP cards (deactivate) */
-int isapnp_verbose = 1;			/* verbose mode */
+static int isapnp_rdp;			/* Read Data Port */
+static int isapnp_reset = 1;		/* reset all PnP cards (deactivate) */
+static int isapnp_verbose = 1;		/* verbose mode */
 
 MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
 MODULE_DESCRIPTION("Generic ISA Plug & Play support");
@@ -121,7 +121,7 @@ unsigned char isapnp_read_byte(unsigned 
 	return read_data();
 }
 
-unsigned short isapnp_read_word(unsigned char idx)
+static unsigned short isapnp_read_word(unsigned char idx)
 {
 	unsigned short val;
 
@@ -130,38 +130,19 @@ unsigned short isapnp_read_word(unsigned
 	return val;
 }
 
-unsigned int isapnp_read_dword(unsigned char idx)
-{
-	unsigned int val;
-
-	val = isapnp_read_byte(idx);
-	val = (val << 8) + isapnp_read_byte(idx+1);
-	val = (val << 8) + isapnp_read_byte(idx+2);
-	val = (val << 8) + isapnp_read_byte(idx+3);
-	return val;
-}
-
 void isapnp_write_byte(unsigned char idx, unsigned char val)
 {
 	write_address(idx);
 	write_data(val);
 }
 
-void isapnp_write_word(unsigned char idx, unsigned short val)
+static void isapnp_write_word(unsigned char idx, unsigned short val)
 {
 	isapnp_write_byte(idx, val >> 8);
 	isapnp_write_byte(idx+1, val);
 }
 
-void isapnp_write_dword(unsigned char idx, unsigned int val)
-{
-	isapnp_write_byte(idx, val >> 24);
-	isapnp_write_byte(idx+1, val >> 16);
-	isapnp_write_byte(idx+2, val >> 8);
-	isapnp_write_byte(idx+3, val);
-}
-
-void *isapnp_alloc(long size)
+static void *isapnp_alloc(long size)
 {
 	void *result;
 
@@ -196,24 +177,24 @@ static void isapnp_wait(void)
 	isapnp_write_byte(0x02, 0x02);
 }
 
-void isapnp_wake(unsigned char csn)
+static void isapnp_wake(unsigned char csn)
 {
 	isapnp_write_byte(0x03, csn);
 }
 
-void isapnp_device(unsigned char logdev)
+static void isapnp_device(unsigned char logdev)
 {
 	isapnp_write_byte(0x07, logdev);
 }
 
-void isapnp_activate(unsigned char logdev)
+static void isapnp_activate(unsigned char logdev)
 {
 	isapnp_device(logdev);
 	isapnp_write_byte(ISAPNP_CFG_ACTIVATE, 1);
 	udelay(250);
 }
 
-void isapnp_deactivate(unsigned char logdev)
+static void isapnp_deactivate(unsigned char logdev)
 {
 	isapnp_device(logdev);
 	isapnp_write_byte(ISAPNP_CFG_ACTIVATE, 0);
@@ -972,13 +953,7 @@ EXPORT_SYMBOL(isapnp_present);
 EXPORT_SYMBOL(isapnp_cfg_begin);
 EXPORT_SYMBOL(isapnp_cfg_end);
 EXPORT_SYMBOL(isapnp_read_byte);
-EXPORT_SYMBOL(isapnp_read_word);
-EXPORT_SYMBOL(isapnp_read_dword);
 EXPORT_SYMBOL(isapnp_write_byte);
-EXPORT_SYMBOL(isapnp_write_word);
-EXPORT_SYMBOL(isapnp_write_dword);
-EXPORT_SYMBOL(isapnp_wake);
-EXPORT_SYMBOL(isapnp_device);
 
 static int isapnp_read_resources(struct pnp_dev *dev, struct pnp_resource_table *res)
 {
@@ -1070,7 +1045,7 @@ struct pnp_protocol isapnp_protocol = {
 	.disable = isapnp_disable_resources,
 };
 
-int __init isapnp_init(void)
+static int __init isapnp_init(void)
 {
 	int cards;
 	struct pnp_card *card;
diff -puN include/linux/isapnp.h~misc-isapnp-cleanups include/linux/isapnp.h
--- 25/include/linux/isapnp.h~misc-isapnp-cleanups	2005-01-18 20:59:48.996575240 -0800
+++ 25-akpm/include/linux/isapnp.h	2005-01-18 20:59:49.000574632 -0800
@@ -100,16 +100,7 @@ int isapnp_present(void);
 int isapnp_cfg_begin(int csn, int device);
 int isapnp_cfg_end(void);
 unsigned char isapnp_read_byte(unsigned char idx);
-unsigned short isapnp_read_word(unsigned char idx);
-unsigned int isapnp_read_dword(unsigned char idx);
 void isapnp_write_byte(unsigned char idx, unsigned char val);
-void isapnp_write_word(unsigned char idx, unsigned short val);
-void isapnp_write_dword(unsigned char idx, unsigned int val);
-void isapnp_wake(unsigned char csn);
-void isapnp_device(unsigned char device);
-void isapnp_activate(unsigned char device);
-void isapnp_deactivate(unsigned char device);
-void *isapnp_alloc(long size);
 
 #ifdef CONFIG_PROC_FS
 int isapnp_proc_init(void);
@@ -119,9 +110,6 @@ static inline int isapnp_proc_init(void)
 static inline int isapnp_proc_done(void) { return 0; }
 #endif
 
-/* init/main.c */
-int isapnp_init(void);
-
 /* compat */
 struct pnp_card *pnp_find_card(unsigned short vendor,
 			       unsigned short device,
@@ -138,15 +126,7 @@ static inline int isapnp_present(void) {
 static inline int isapnp_cfg_begin(int csn, int device) { return -ENODEV; }
 static inline int isapnp_cfg_end(void) { return -ENODEV; }
 static inline unsigned char isapnp_read_byte(unsigned char idx) { return 0xff; }
-static inline unsigned short isapnp_read_word(unsigned char idx) { return 0xffff; }
-static inline unsigned int isapnp_read_dword(unsigned char idx) { return 0xffffffff; }
 static inline void isapnp_write_byte(unsigned char idx, unsigned char val) { ; }
-static inline void isapnp_write_word(unsigned char idx, unsigned short val) { ; }
-static inline void isapnp_write_dword(unsigned char idx, unsigned int val) { ; }
-static inline void isapnp_wake(unsigned char csn) { ; }
-static inline void isapnp_device(unsigned char device) { ; }
-static inline void isapnp_activate(unsigned char device) { ; }
-static inline void isapnp_deactivate(unsigned char device) { ; }
 
 static inline struct pnp_card *pnp_find_card(unsigned short vendor,
 					     unsigned short device,
_
