From: Adam Belay <ambx1@neo.rr.com>

> ...
>   CC      sound/isa/ad1816a/ad1816a.o
> sound/isa/ad1816a/ad1816a.c: In function `snd_card_ad1816a_pnp':
> sound/isa/ad1816a/ad1816a.c:143: warning: implicit declaration of 
> function `pnp_init_resource_table'
> ...
>   LD      .tmp_vmlinux1
> sound/built-in.o(.text+0x349c7): In function `snd_card_ad1816a_pnp':
> : undefined reference to `pnp_init_resource_table'
> sound/built-in.o(.text+0x34ad3): In function `snd_card_ad1816a_pnp':
> : undefined reference to `pnp_init_resource_table'
> make: *** [.tmp_vmlinux1] Error 1
> 

The patch below will correct this.



 drivers/pnp/interface.c    |    8 ++++----
 drivers/pnp/isapnp/core.c  |    4 ++--
 drivers/pnp/manager.c      |   12 ++++++------
 drivers/pnp/pnpbios/core.c |    2 +-
 drivers/pnp/support.c      |    2 +-
 include/linux/pnp.h        |    4 ++--
 6 files changed, 16 insertions(+), 16 deletions(-)

diff -puN drivers/pnp/interface.c~alsa-pnp-fix drivers/pnp/interface.c
--- 25/drivers/pnp/interface.c~alsa-pnp-fix	2003-06-22 23:57:20.000000000 -0700
+++ 25-akpm/drivers/pnp/interface.c	2003-06-22 23:57:20.000000000 -0700
@@ -275,7 +275,7 @@ static ssize_t pnp_show_current_resource
 	for (i = 0; i < PNP_MAX_IRQ; i++) {
 		if (pnp_irq_valid(dev, i)) {
 			pnp_printf(buffer,"irq");
-			pnp_printf(buffer," %ld \n", pnp_irq(dev, i));
+			pnp_printf(buffer," %lx \n", pnp_irq(dev, i));
 		}
 	}
 	for (i = 0; i < PNP_MAX_DMA; i++) {
@@ -323,14 +323,14 @@ pnp_set_current_resources(struct device 
 	if (!strnicmp(buf,"auto",4)) {
 		if (dev->active)
 			goto done;
-		pnp_init_resources(&dev->res);
+		pnp_init_resource_table(&dev->res);
 		retval = pnp_auto_config_dev(dev);
 		goto done;
 	}
 	if (!strnicmp(buf,"clear",5)) {
 		if (dev->active)
 			goto done;
-		pnp_init_resources(&dev->res);
+		pnp_init_resource_table(&dev->res);
 		goto done;
 	}
 	if (!strnicmp(buf,"get",3)) {
@@ -345,7 +345,7 @@ pnp_set_current_resources(struct device 
 		if (dev->active)
 			goto done;
 		buf += 3;
-		pnp_init_resources(&dev->res);
+		pnp_init_resource_table(&dev->res);
 		down(&pnp_res_mutex);
 		while (1) {
 			while (isspace(*buf))
diff -puN drivers/pnp/isapnp/core.c~alsa-pnp-fix drivers/pnp/isapnp/core.c
--- 25/drivers/pnp/isapnp/core.c~alsa-pnp-fix	2003-06-22 23:57:20.000000000 -0700
+++ 25-akpm/drivers/pnp/isapnp/core.c	2003-06-22 23:57:20.000000000 -0700
@@ -458,7 +458,7 @@ static struct pnp_dev * __init isapnp_pa
 	dev->capabilities |= PNP_READ;
 	dev->capabilities |= PNP_WRITE;
 	dev->capabilities |= PNP_DISABLE;
-	pnp_init_resources(&dev->res);
+	pnp_init_resource_table(&dev->res);
 	return dev;
 }
 
@@ -1020,7 +1020,7 @@ static int isapnp_read_resources(struct 
 static int isapnp_get_resources(struct pnp_dev *dev, struct pnp_resource_table * res)
 {
 	int ret;
-	pnp_init_resources(res);
+	pnp_init_resource_table(res);
 	isapnp_cfg_begin(dev->card->number, dev->number);
 	ret = isapnp_read_resources(dev, res);
 	isapnp_cfg_end();
diff -puN drivers/pnp/manager.c~alsa-pnp-fix drivers/pnp/manager.c
--- 25/drivers/pnp/manager.c~alsa-pnp-fix	2003-06-22 23:57:20.000000000 -0700
+++ 25-akpm/drivers/pnp/manager.c	2003-06-22 23:57:20.000000000 -0700
@@ -190,7 +190,7 @@ static int pnp_assign_dma(struct pnp_dev
  * @table: pointer to the desired resource table
  *
  */
-void pnp_init_resources(struct pnp_resource_table *table)
+void pnp_init_resource_table(struct pnp_resource_table *table)
 {
 	int idx;
 	down(&pnp_res_mutex);
@@ -226,7 +226,7 @@ void pnp_init_resources(struct pnp_resou
  * @res - the resources to clean
  *
  */
-static void pnp_clean_resources(struct pnp_resource_table * res)
+static void pnp_clean_resource_table(struct pnp_resource_table * res)
 {
 	int idx;
 	for (idx = 0; idx < PNP_MAX_IRQ; idx++) {
@@ -278,7 +278,7 @@ int pnp_assign_resources(struct pnp_dev 
 		return -ENODEV;
 
 	down(&pnp_res_mutex);
-	pnp_clean_resources(&dev->res); /* start with a fresh slate */
+	pnp_clean_resource_table(&dev->res); /* start with a fresh slate */
 	if (dev->independent) {
 		port = dev->independent->port;
 		mem = dev->independent->mem;
@@ -351,7 +351,7 @@ int pnp_assign_resources(struct pnp_dev 
 	return 1;
 
 fail:
-	pnp_clean_resources(&dev->res);
+	pnp_clean_resource_table(&dev->res);
 	up(&pnp_res_mutex);
 	return 0;
 }
@@ -510,7 +510,7 @@ int pnp_disable_dev(struct pnp_dev *dev)
 
 	/* release the resources so that other devices can use them */
 	down(&pnp_res_mutex);
-	pnp_clean_resources(&dev->res);
+	pnp_clean_resource_table(&dev->res);
 	up(&pnp_res_mutex);
 
 	return 1;
@@ -539,4 +539,4 @@ EXPORT_SYMBOL(pnp_auto_config_dev);
 EXPORT_SYMBOL(pnp_activate_dev);
 EXPORT_SYMBOL(pnp_disable_dev);
 EXPORT_SYMBOL(pnp_resource_change);
-EXPORT_SYMBOL(pnp_init_resources);
+EXPORT_SYMBOL(pnp_init_resource_table);
diff -puN drivers/pnp/pnpbios/core.c~alsa-pnp-fix drivers/pnp/pnpbios/core.c
--- 25/drivers/pnp/pnpbios/core.c~alsa-pnp-fix	2003-06-22 23:57:20.000000000 -0700
+++ 25-akpm/drivers/pnp/pnpbios/core.c	2003-06-22 23:57:20.000000000 -0700
@@ -937,7 +937,7 @@ static int insert_device(struct pnp_dev 
 
 	/* clear out the damaged flags */
 	if (!dev->active)
-		pnp_init_resources(&dev->res);
+		pnp_init_resource_table(&dev->res);
 
 	pnp_add_device(dev);
 	pnpbios_interface_attach_device(node);
diff -puN drivers/pnp/support.c~alsa-pnp-fix drivers/pnp/support.c
--- 25/drivers/pnp/support.c~alsa-pnp-fix	2003-06-22 23:57:20.000000000 -0700
+++ 25-akpm/drivers/pnp/support.c	2003-06-22 23:57:20.000000000 -0700
@@ -123,7 +123,7 @@ unsigned char * pnp_parse_current_resour
 		return NULL;
 
 	/* Blank the resource table values */
-	pnp_init_resources(res);
+	pnp_init_resource_table(res);
 
 	while ((char *)p < (char *)end) {
 
diff -puN include/linux/pnp.h~alsa-pnp-fix include/linux/pnp.h
--- 25/include/linux/pnp.h~alsa-pnp-fix	2003-06-22 23:57:20.000000000 -0700
+++ 25-akpm/include/linux/pnp.h	2003-06-22 23:57:20.000000000 -0700
@@ -400,7 +400,7 @@ int pnp_register_irq_resource(struct pnp
 int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data);
 int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data);
 int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data);
-void pnp_init_resources(struct pnp_resource_table *table);
+void pnp_init_resource_table(struct pnp_resource_table *table);
 int pnp_assign_resources(struct pnp_dev *dev, int depnum);
 int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode);
 int pnp_auto_config_dev(struct pnp_dev *dev);
@@ -448,7 +448,7 @@ static inline int pnp_register_irq_resou
 static inline int pnp_register_dma_resource(struct pnp_option *option, struct pnp_dma *data) { return -ENODEV; }
 static inline int pnp_register_port_resource(struct pnp_option *option, struct pnp_port *data) { return -ENODEV; }
 static inline int pnp_register_mem_resource(struct pnp_option *option, struct pnp_mem *data) { return -ENODEV; }
-static inline void pnp_init_resources(struct pnp_resource_table *table) { }
+static inline void pnp_init_resource_table(struct pnp_resource_table *table) { }
 static inline int pnp_assign_resources(struct pnp_dev *dev, int depnum) { return -ENODEV; }
 static inline int pnp_manual_config_dev(struct pnp_dev *dev, struct pnp_resource_table *res, int mode) { return -ENODEV; }
 static inline int pnp_auto_config_dev(struct pnp_dev *dev) { return -ENODEV; }

_