--- linux/drivers/i2c/i2c-adap-ibm_ocp.c.orig 2002-09-13 01:16:58.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-adap-ibm_ocp.c 2002-09-15 01:13:57.000000000 -0400 @@ -90,6 +90,14 @@ static wait_queue_head_t iic_wait[IIC_NUMS]; static int iic_pending; +#ifdef MODULE +static +#else +extern +#endif + int __init iic_ibmocp_init(void); +static void __exit iic_ibmocp_exit(void); + /* ----- global defines ----------------------------------------------- */ #define DEB(x) if (i2c_debug>=1) x #define DEB2(x) if (i2c_debug>=2) x @@ -370,7 +378,7 @@ } -static void iic_ibmocp_exit(void) +static void __exit iic_ibmocp_exit(void) { int i; --- linux/drivers/i2c/i2c-algo-8xx.c.orig 2002-09-13 01:17:07.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-algo-8xx.c 2002-09-13 01:47:42.000000000 -0400 @@ -51,6 +51,13 @@ int cpm_scan = 1; int cpm_debug = 0; +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_algo_8xx_init (void); + static void cpm_iic_interrupt(void *dev_id, void *regs) { --- linux/drivers/i2c/i2c-algo-bit.c.orig 2002-09-13 01:12:26.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-algo-bit.c 2002-09-13 01:45:43.000000000 -0400 @@ -65,6 +65,13 @@ static int bit_test; /* see if the line-setting functions work */ static int bit_scan; /* have a look at what's hanging 'round */ +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_algo_bit_init (void); + /* --- setting states on the bus with the right timing: --------------- */ #define setsda(adap,val) adap->setsda(adap->data, val) --- linux/drivers/i2c/i2c-algo-ibm_ocp.c.orig 2002-09-13 01:17:24.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-algo-ibm_ocp.c 2002-09-13 02:14:05.000000000 -0400 @@ -100,6 +100,14 @@ static int i2c_debug=0; static int iic_scan=0; /* have a look at what's hanging 'round */ +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_algo_iic_init (void); +static void __exit i2c_algo_iic_exit(void); + /* --- setting states on the bus with the right timing: --------------- */ #define iic_outb(adap, reg, val) adap->setiic(adap->data, (int) &(reg), val) @@ -936,7 +944,7 @@ } -void i2c_algo_iic_exit(void) +void __exit i2c_algo_iic_exit(void) { return; } --- linux/drivers/i2c/i2c-core.c.orig 2002-09-13 01:13:16.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-core.c 2002-09-13 02:27:26.000000000 -0400 @@ -81,7 +81,12 @@ #ifdef CONFIG_PROC_FS -static int i2cproc_init(void); +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_init(void); static int i2cproc_cleanup(void); #if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,27)) @@ -1476,7 +1481,7 @@ } -static int __init i2c_init(void) +int __init i2c_init(void) { printk(KERN_INFO "i2c-core.o: i2c core module version %s (%s)\n", I2C_VERSION, I2C_DATE); memset(adapters,0,sizeof(adapters)); --- linux/drivers/i2c/i2c-elektor.c.orig 2002-09-13 01:48:39.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-elektor.c 2002-09-13 02:42:50.000000000 -0400 @@ -57,6 +57,14 @@ static wait_queue_head_t pcf_wait; static int pcf_pending; + +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_pcfisa_init(void); +static void pcf_isa_exit(void); /* ----- global defines ----------------------------------------------- */ #define DEB(x) if (i2c_debug>=1) x --- linux/drivers/i2c/i2c-elv.c.orig 2002-09-13 01:50:14.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-elv.c 2002-09-13 01:51:11.000000000 -0400 @@ -40,6 +40,14 @@ static int base=0; static unsigned char PortData = 0; +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_bitelv_init(void); +static void __exit bit_elv_exit(void); + /* ----- global defines ----------------------------------------------- */ #define DEB(x) /* should be reasonable open, close &c. */ #define DEB2(x) /* low level debugging - very slow */ --- linux/drivers/i2c/i2c-frodo.c.orig 2002-09-13 01:51:21.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-frodo.c 2002-09-13 01:52:30.000000000 -0400 @@ -25,6 +25,14 @@ #include #include +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_frodo_init (void); +static void __exit i2c_frodo_exit (void); + static void frodo_setsda (void *data,int state) { if (state) @@ -92,7 +92,7 @@ client_unregister: frodo_client_unregister }; -static int __init i2c_frodo_init (void) +int __init i2c_frodo_init (void) { return (i2c_bit_add_bus (&frodo_ops)); } --- linux/drivers/i2c/i2c-pcf-epp.c.orig 2002-09-13 01:52:54.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-pcf-epp.c 2002-09-15 01:15:55.000000000 -0400 @@ -38,6 +38,14 @@ static wait_queue_head_t pcf_wait; static int pcf_pending; +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_pcfepp_init(void); +static void __exit pcf_epp_exit(void); + /* ----- global defines ----------------------------------------------- */ #define DEB(x) if (i2c_debug>=1) x #define DEB2(x) if (i2c_debug>=2) x --- linux/drivers/i2c/i2c-philips-par.c.orig 2002-09-13 01:54:16.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-philips-par.c 2002-09-13 02:30:26.000000000 -0400 @@ -48,6 +48,14 @@ static struct i2c_par *adapter_list; +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_bitlp_init(void); +static void __exit i2c_bitlp_exit(void); + /* ----- global defines ----------------------------------------------- */ #define DEB(x) /* should be reasonable open, close &c. */ --- linux/drivers/i2c/i2c-pport.c.orig 2002-09-13 01:55:37.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-pport.c 2002-09-13 01:56:26.000000000 -0400 @@ -47,6 +47,14 @@ static int base=0; static unsigned char PortData = 0; +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_bitpport_init(void); +static void __exit bit_pport_exit(void); + /* ----- global defines ----------------------------------------------- */ #define DEB(x) /* should be reasonable open, close &c. */ #define DEB2(x) /* low level debugging - very slow */ --- linux/drivers/i2c/i2c-proc.c.orig 2002-09-14 08:15:20.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-proc.c 2002-09-14 08:38:38.000000000 -0400 @@ -54,7 +54,6 @@ void *newval, size_t newlen, void **context); -int __init sensors_init(void); #define SENSORS_ENTRY_MAX 20 static struct ctl_table_header *i2c_entries[SENSORS_ENTRY_MAX]; @@ -827,13 +826,12 @@ MODULE_DESCRIPTION("i2c-proc driver"); MODULE_LICENSE("GPL"); -int i2c_cleanup(void) +static void __exit i2c_cleanup(void) { if (i2c_initialized >= 1) { unregister_sysctl_table(i2c_proc_header); i2c_initialized--; } - return 0; } int init_module(void) @@ -841,9 +839,9 @@ return sensors_init(); } -int cleanup_module(void) +void cleanup_module(void) { - return i2c_cleanup(); + i2c_cleanup(); } #endif /* MODULE */ --- linux/drivers/i2c/i2c-rpx.c.orig 2002-09-13 01:57:53.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-rpx.c 2002-09-13 01:58:46.000000000 -0400 @@ -24,6 +24,14 @@ #include #include +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_rpx_init(void); +static void __exit i2c_rpx_exit(void); + static void rpx_iic_init(struct i2c_algo_8xx_data *data) { --- linux/drivers/i2c/i2c-velleman.c.orig 2002-09-13 01:58:56.000000000 -0400 +++ linux-2.5.34/drivers/i2c/i2c-velleman.c 2002-09-13 01:59:46.000000000 -0400 @@ -55,6 +55,14 @@ #define DEFAULT_BASE 0x378 static int base=0; +#ifdef MODULE +static +#else +extern +#endif + int __init i2c_bitvelle_init(void); +static void __exit bit_velle_exit(void); + /* ----- local functions --------------------------------------------------- */ static void bit_velle_setscl(void *data, int state)