isapnp: broken API

From: Sacher Khoudari
Date: Fri Feb 23 2007 - 11:37:26 EST


Hi!

I've lately tried to run a ISA card (HP 82341, with drivers from the Linux GPIB project, latest version), but the module failed to get loaded. Modprobe said it couldn't find a symbol (Undefined symbol 'isapnp_read_byte'), although it was present in /boot/System.map and /proc/kallsyms. After some googleing, trying to compile a new kernel, looking into code, etc, I found out what the problem was. The function "isapnp_read_byte" was no longer been exported. You can find the line in question here [1] (note the #if 0). The patch that did this change was this [2] one.

I'm not sure, but as I understand it, it was not intended to comment this EXPORT_SYMBOLS(isapnp_read_byte) out. So it probably just happened by accident?

I've attached a patch for the latest stable kernel (2.6.20.1). Please apply it.


Greetings
Sacher



[1] http://www.gelato.unsw.edu.au/lxr/source/drivers/pnp/isapnp/core.c#L948
[2] http://lkml.org/lkml/2005/6/20/307
--- linux-2.6.20.1/drivers/pnp/isapnp/core.c.old 2007-02-23 16:20:46.000000000 +0100
+++ linux-2.6.20.1/drivers/pnp/isapnp/core.c 2007-02-23 16:21:25.000000000 +0100
@@ -943,9 +943,7 @@
EXPORT_SYMBOL(isapnp_present);
EXPORT_SYMBOL(isapnp_cfg_begin);
EXPORT_SYMBOL(isapnp_cfg_end);
-#if 0
EXPORT_SYMBOL(isapnp_read_byte);
-#endif
EXPORT_SYMBOL(isapnp_write_byte);

static int isapnp_read_resources(struct pnp_dev *dev, struct pnp_resource_table *res)