* [PATCH 2.4] i2c cleanups, second wave
@ 2003-12-24 21:57 Jean Delvare
2003-12-24 22:12 ` [PATCH 2.4] i2c cleanups, second wave (1/5) Jean Delvare
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: Jean Delvare @ 2003-12-24 21:57 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: LKML, LM Sensors
I will be sending 5 patches to you, based on linux-2.4.24-pre2. They
contain cleanups for the i2c subsystem code, ported from LM Sensors' i2c
CVS repository [1].
Details about what the patch does and credits will be found with each
patch.
Please apply,
thanks.
[1] http://www2.lm-sensors.nu/~lm78/cvs/browse.cgi/i2c
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2.4] i2c cleanups, second wave (1/5)
2003-12-24 21:57 [PATCH 2.4] i2c cleanups, second wave Jean Delvare
@ 2003-12-24 22:12 ` Jean Delvare
2003-12-24 22:32 ` [PATCH 2.4] i2c cleanups, second wave (2/5) Jean Delvare
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2003-12-24 22:12 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: LKML, LM Sensors
This patch fixes init and exit functions for all i2c subsystem drivers,
switching from the 2.2 legacy method to the better 2.4 method. In the
process, useless functions were removed, and static, __init and __exit
keywords were enforced. One interesting thing here is that drivers no
longer depend on i2c-core for initialization after this change, which
makes adding and removing drivers easier.
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-adap-ite.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-adap-ite.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-adap-ite.c Sat Aug 3 02:39:44 2002
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-adap-ite.c Mon Dec 22 22:04:00 2003
@@ -286,7 +286,7 @@
}
-static void iic_ite_exit(void)
+static void __exit iic_ite_exit(void)
{
i2c_iic_del_bus(&iic_ite_ops);
iic_ite_release();
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-algo-bit.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-bit.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-algo-bit.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-bit.c Mon Dec 22 22:04:00 2003
@@ -607,18 +607,9 @@
return 0;
}
-int __init i2c_algo_bit_init (void)
-{
- printk(KERN_INFO "i2c-algo-bit.o: i2c bit algorithm module\n");
- return 0;
-}
-
-
-
EXPORT_SYMBOL(i2c_bit_add_bus);
EXPORT_SYMBOL(i2c_bit_del_bus);
-#ifdef MODULE
MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
MODULE_DESCRIPTION("I2C-Bus bit-banging algorithm");
MODULE_LICENSE("GPL");
@@ -631,13 +622,3 @@
MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus");
MODULE_PARM_DESC(i2c_debug,
"debug level - 0 off; 1 normal; 2,3 more verbose; 9 bit-protocol");
-
-int init_module(void)
-{
- return i2c_algo_bit_init();
-}
-
-void cleanup_module(void)
-{
-}
-#endif
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-algo-ite.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-ite.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-algo-ite.c Thu Oct 11 17:05:47 2001
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-ite.c Mon Dec 22 22:04:00 2003
@@ -822,20 +822,6 @@
return 0;
}
-
-int __init i2c_algo_iic_init (void)
-{
- printk(KERN_INFO "ITE iic (i2c) algorithm module\n");
- return 0;
-}
-
-
-void i2c_algo_iic_exit(void)
-{
- return;
-}
-
-
EXPORT_SYMBOL(i2c_iic_add_bus);
EXPORT_SYMBOL(i2c_iic_del_bus);
@@ -854,20 +840,3 @@
MODULE_PARM_DESC(iic_scan, "Scan for active chips on the bus");
MODULE_PARM_DESC(i2c_debug,
"debug level - 0 off; 1 normal; 2,3 more verbose; 9 iic-protocol");
-
-
-/* This function resolves to init_module (the function invoked when a module
- * is loaded via insmod) when this file is compiled with MODULES defined.
- * Otherwise (i.e. if you want this driver statically linked to the kernel),
- * a pointer to this function is stored in a table and called
- * during the intialization of the kernel (in do_basic_setup in /init/main.c)
- *
- * All this functionality is complements of the macros defined in linux/init.h
- */
-module_init(i2c_algo_iic_init);
-
-
-/* If MODULES is defined when this file is compiled, then this function will
- * resolved to cleanup_module.
- */
-module_exit(i2c_algo_iic_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-algo-pcf.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-pcf.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-algo-pcf.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-pcf.c Mon Dec 22 22:04:00 2003
@@ -522,17 +522,9 @@
return 0;
}
-int __init i2c_algo_pcf_init (void)
-{
- printk("i2c-algo-pcf.o: i2c pcf8584 algorithm module\n");
- return 0;
-}
-
-
EXPORT_SYMBOL(i2c_pcf_add_bus);
EXPORT_SYMBOL(i2c_pcf_del_bus);
-#ifdef MODULE
MODULE_AUTHOR("Hans Berglund <hb@spacetec.no>");
MODULE_DESCRIPTION("I2C-Bus PCF8584 algorithm");
MODULE_LICENSE("GPL");
@@ -543,14 +535,3 @@
MODULE_PARM_DESC(pcf_scan, "Scan for active chips on the bus");
MODULE_PARM_DESC(i2c_debug,
"debug level - 0 off; 1 normal; 2,3 more verbose; 9 pcf-protocol");
-
-
-int init_module(void)
-{
- return i2c_algo_pcf_init();
-}
-
-void cleanup_module(void)
-{
-}
-#endif
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-algo-sibyte.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-sibyte.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-algo-sibyte.c Mon Aug 25 13:44:41 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-sibyte.c Mon Dec 22 22:04:00 2003
@@ -203,29 +203,11 @@
return 0;
}
-int __init i2c_algo_sibyte_init (void)
-{
- printk("i2c-algo-sibyte.o: i2c SiByte algorithm module\n");
- return 0;
-}
-
-
EXPORT_SYMBOL(i2c_sibyte_add_bus);
EXPORT_SYMBOL(i2c_sibyte_del_bus);
-#ifdef MODULE
MODULE_AUTHOR("Kip Walker, Broadcom Corp.");
MODULE_DESCRIPTION("SiByte I2C-Bus algorithm");
MODULE_PARM(bit_scan, "i");
MODULE_PARM_DESC(bit_scan, "Scan for active chips on the bus");
MODULE_LICENSE("GPL");
-
-int init_module(void)
-{
- return i2c_algo_sibyte_init();
-}
-
-void cleanup_module(void)
-{
-}
-#endif
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-core.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-core.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-core.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-core.c Mon Dec 22 22:04:00 2003
@@ -1273,121 +1273,27 @@
init_MUTEX(&adap_lock);
init_MUTEX(&driver_lock);
- i2cproc_init();
-
+#ifdef CONFIG_PROC_FS
+ return i2cproc_init();
+#else
return 0;
-}
-
-#ifndef MODULE
-#ifdef CONFIG_I2C_CHARDEV
- extern int i2c_dev_init(void);
-#endif
-#ifdef CONFIG_I2C_ALGOBIT
- extern int i2c_algo_bit_init(void);
-#endif
-#ifdef CONFIG_I2C_PHILIPSPAR
- extern int i2c_bitlp_init(void);
-#endif
-#ifdef CONFIG_I2C_ELV
- extern int i2c_bitelv_init(void);
-#endif
-#ifdef CONFIG_I2C_VELLEMAN
- extern int i2c_bitvelle_init(void);
-#endif
-#ifdef CONFIG_I2C_BITVIA
- extern int i2c_bitvia_init(void);
-#endif
-
-#ifdef CONFIG_I2C_ALGOPCF
- extern int i2c_algo_pcf_init(void);
-#endif
-#ifdef CONFIG_I2C_ELEKTOR
- extern int i2c_pcfisa_init(void);
-#endif
-
-#ifdef CONFIG_I2C_ALGO8XX
- extern int i2c_algo_8xx_init(void);
-#endif
-#ifdef CONFIG_I2C_RPXLITE
- extern int i2c_rpx_init(void);
-#endif
-
-#ifdef CONFIG_I2C_ALGO_SIBYTE
- extern int i2c_algo_sibyte_init(void);
- extern int i2c_sibyte_init(void);
-#endif
-#ifdef CONFIG_I2C_MAX1617
- extern int i2c_max1617_init(void);
#endif
+}
-#ifdef CONFIG_I2C_PROC
- extern int sensors_init(void);
+static void __exit i2c_exit(void)
+{
+#ifdef CONFIG_PROC_FS
+ i2cproc_cleanup();
#endif
+}
-/* This is needed for automatic patch generation: sensors code starts here */
-/* This is needed for automatic patch generation: sensors code ends here */
-
+/* leave this in for now simply to make patching easier so we don't have
+ to remove the call in drivers/char/mem.c */
int __init i2c_init_all(void)
{
- /* --------------------- global ----- */
- i2c_init();
-
-#ifdef CONFIG_I2C_CHARDEV
- i2c_dev_init();
-#endif
- /* --------------------- bit -------- */
-#ifdef CONFIG_I2C_ALGOBIT
- i2c_algo_bit_init();
-#endif
-#ifdef CONFIG_I2C_PHILIPSPAR
- i2c_bitlp_init();
-#endif
-#ifdef CONFIG_I2C_ELV
- i2c_bitelv_init();
-#endif
-#ifdef CONFIG_I2C_VELLEMAN
- i2c_bitvelle_init();
-#endif
-
- /* --------------------- pcf -------- */
-#ifdef CONFIG_I2C_ALGOPCF
- i2c_algo_pcf_init();
-#endif
-#ifdef CONFIG_I2C_ELEKTOR
- i2c_pcfisa_init();
-#endif
-
- /* --------------------- 8xx -------- */
-#ifdef CONFIG_I2C_ALGO8XX
- i2c_algo_8xx_init();
-#endif
-#ifdef CONFIG_I2C_RPXLITE
- i2c_rpx_init();
-#endif
-
- /* --------------------- SiByte -------- */
-#ifdef CONFIG_I2C_ALGO_SIBYTE
- i2c_algo_sibyte_init();
- i2c_sibyte_init();
-#endif
-#ifdef CONFIG_I2C_MAX1617
- i2c_max1617_init();
-#endif
-
- /* -------------- proc interface ---- */
-#ifdef CONFIG_I2C_PROC
- sensors_init();
-#endif
-/* This is needed for automatic patch generation: sensors code starts here */
-/* This is needed for automatic patch generation: sensors code ends here */
-
return 0;
}
-#endif
-
-
-
EXPORT_SYMBOL(i2c_add_adapter);
EXPORT_SYMBOL(i2c_del_adapter);
EXPORT_SYMBOL(i2c_add_driver);
@@ -1424,7 +1330,6 @@
EXPORT_SYMBOL(i2c_get_functionality);
EXPORT_SYMBOL(i2c_check_functionality);
-#ifdef MODULE
MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
MODULE_DESCRIPTION("I2C-Bus main module");
MODULE_LICENSE("GPL");
@@ -1432,13 +1337,5 @@
MODULE_PARM(i2c_debug, "i");
MODULE_PARM_DESC(i2c_debug,"debug level");
-int init_module(void)
-{
- return i2c_init();
-}
-
-void cleanup_module(void)
-{
- i2cproc_cleanup();
-}
-#endif
+module_init(i2c_init);
+module_exit(i2c_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-dev.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-dev.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-dev.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-dev.c Mon Dec 22 22:04:00 2003
@@ -53,11 +53,6 @@
#include <linux/i2c.h>
#include <linux/i2c-dev.h>
-#ifdef MODULE
-extern int init_module(void);
-extern int cleanup_module(void);
-#endif /* def MODULE */
-
/* struct file_operations changed too often in the 2.1 series for nice code */
#if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,9)
@@ -79,12 +74,6 @@
static int i2cdev_command(struct i2c_client *client, unsigned int cmd,
void *arg);
-#ifdef MODULE
-static
-#else
-extern
-#endif
- int __init i2c_dev_init(void);
static int i2cdev_cleanup(void);
static struct file_operations i2cdev_fops = {
@@ -514,7 +503,7 @@
return -1;
}
-int __init i2c_dev_init(void)
+static int __init i2c_dev_init(void)
{
int res;
@@ -544,7 +533,7 @@
return 0;
}
-int i2cdev_cleanup(void)
+static int __exit i2cdev_cleanup(void)
{
int res;
@@ -573,23 +562,16 @@
return 0;
}
-EXPORT_NO_SYMBOLS;
+static void __exit i2c_dev_exit(void)
+{
+ i2cdev_cleanup();
+}
-#ifdef MODULE
+EXPORT_NO_SYMBOLS;
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl> and Simon G. Vogl <simon@tk.uni-linz.ac.at>");
MODULE_DESCRIPTION("I2C /dev entries driver");
MODULE_LICENSE("GPL");
-int init_module(void)
-{
- return i2c_dev_init();
-}
-
-int cleanup_module(void)
-{
- return i2cdev_cleanup();
-}
-
-#endif /* def MODULE */
-
+module_init(i2c_dev_init);
+module_exit(i2c_dev_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-elektor.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-elektor.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-elektor.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-elektor.c Mon Dec 22 22:04:00 2003
@@ -160,19 +160,6 @@
return 0;
}
-
-static void __exit pcf_isa_exit(void)
-{
- if (irq > 0) {
- disable_irq(irq);
- free_irq(irq, 0);
- }
- if (!mmapped) {
- release_region(base , 2);
- }
-}
-
-
static int pcf_isa_reg(struct i2c_client *client)
{
return 0;
@@ -224,7 +211,7 @@
pcf_isa_unreg,
};
-int __init i2c_pcfisa_init(void)
+static int __init i2c_pcfisa_init(void)
{
#ifdef __alpha__
/* check to see we have memory mapped PCF8584 connected to the
@@ -296,10 +283,21 @@
return 0;
}
+static void __exit i2c_pcfisa_exit(void)
+{
+ i2c_pcf_del_bus(&pcf_isa_ops);
+
+ if (irq > 0) {
+ disable_irq(irq);
+ free_irq(irq, 0);
+ }
+
+ if (!mmapped)
+ release_region(base , 2);
+}
EXPORT_NO_SYMBOLS;
-#ifdef MODULE
MODULE_AUTHOR("Hans Berglund <hb@spacetec.no>");
MODULE_DESCRIPTION("I2C-Bus adapter routines for PCF8584 ISA bus adapter");
MODULE_LICENSE("GPL");
@@ -311,15 +309,5 @@
MODULE_PARM(mmapped, "i");
MODULE_PARM(i2c_debug, "i");
-int init_module(void)
-{
- return i2c_pcfisa_init();
-}
-
-void cleanup_module(void)
-{
- i2c_pcf_del_bus(&pcf_isa_ops);
- pcf_isa_exit();
-}
-
-#endif
+module_init(i2c_pcfisa_init);
+module_exit(i2c_pcfisa_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-elv.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-elv.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-elv.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-elv.c Mon Dec 22 22:04:00 2003
@@ -115,11 +115,6 @@
return 0;
}
-static void __exit bit_elv_exit(void)
-{
- release_region( base , (base == 0x3bc)? 3 : 8 );
-}
-
static int bit_elv_reg(struct i2c_client *client)
{
return 0;
@@ -168,7 +163,7 @@
bit_elv_unreg,
};
-int __init i2c_bitelv_init(void)
+static int __init i2c_bitelv_init(void)
{
printk(KERN_INFO "i2c-elv.o: i2c ELV parallel port adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
if (base==0) {
@@ -194,25 +189,19 @@
return 0;
}
+static void __exit i2c_bitelv_exit(void)
+{
+ i2c_bit_del_bus(&bit_elv_ops);
+ release_region(base, (base == 0x3bc) ? 3 : 8);
+}
EXPORT_NO_SYMBOLS;
-#ifdef MODULE
MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
MODULE_DESCRIPTION("I2C-Bus adapter routines for ELV parallel port adapter");
MODULE_LICENSE("GPL");
MODULE_PARM(base, "i");
-int init_module(void)
-{
- return i2c_bitelv_init();
-}
-
-void cleanup_module(void)
-{
- i2c_bit_del_bus(&bit_elv_ops);
- bit_elv_exit();
-}
-
-#endif
+module_init(i2c_bitelv_init);
+module_exit(i2c_bitelv_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-max1617.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-max1617.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-max1617.c Mon Aug 25 13:44:41 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-max1617.c Mon Dec 22 22:04:00 2003
@@ -200,26 +200,21 @@
#endif
}
-void i2c_max1617_init(void)
+static int __init i2c_max1617_init(void)
{
- i2c_add_driver(&i2c_driver_max1617);
+ return i2c_add_driver(&i2c_driver_max1617);
+}
+
+static void __exit i2c_max1617_exit(void)
+{
+ i2c_del_driver(&i2c_driver_max1617);
}
EXPORT_NO_SYMBOLS;
-#ifdef MODULE
MODULE_AUTHOR("Kip Walker, Broadcom Corp.");
MODULE_DESCRIPTION("Max 1617 temperature sensor for SiByte SOC boards");
MODULE_LICENSE("GPL");
-int init_module(void)
-{
- i2c_max1617_init();
- return 0;
-}
-
-void cleanup_module(void)
-{
- i2c_del_driver(&i2c_driver_max1617);
-}
-#endif
+module_init(i2c_max1617_init);
+module_exit(i2c_max1617_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-philips-par.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-philips-par.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-philips-par.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-philips-par.c Mon Dec 22 22:04:00 2003
@@ -29,14 +29,10 @@
#include <linux/init.h>
#include <linux/stddef.h>
#include <linux/parport.h>
-
+#include <linux/slab.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
-#ifndef __exit
-#define __exit __init
-#endif
-
static int type;
struct i2c_par
@@ -259,7 +255,7 @@
};
#endif
-int __init i2c_bitlp_init(void)
+static int __init i2c_bitlp_init(void)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,4)
struct parport *port;
@@ -276,7 +272,7 @@
return 0;
}
-void __exit i2c_bitlp_exit(void)
+static void __exit i2c_bitlp_exit(void)
{
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,4)
parport_unregister_driver(&i2c_driver);
@@ -295,14 +291,5 @@
MODULE_PARM(type, "i");
-#ifdef MODULE
-int init_module(void)
-{
- return i2c_bitlp_init();
-}
-
-void cleanup_module(void)
-{
- i2c_bitlp_exit();
-}
-#endif
+module_init(i2c_bitlp_init);
+module_exit(i2c_bitlp_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-proc.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-proc.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-proc.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-proc.c Mon Dec 22 22:04:00 2003
@@ -56,8 +56,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];
@@ -856,7 +854,7 @@
return 0;
}
-int __init sensors_init(void)
+static int __init i2c_proc_init(void)
{
printk(KERN_INFO "i2c-proc.o version %s (%s)\n", I2C_VERSION, I2C_DATE);
i2c_initialized = 0;
@@ -873,34 +871,23 @@
return 0;
}
+static void __exit i2c_proc_exit(void)
+{
+ if (i2c_initialized >= 1) {
+ unregister_sysctl_table(i2c_proc_header);
+ i2c_initialized--;
+ }
+}
+
EXPORT_SYMBOL(i2c_deregister_entry);
EXPORT_SYMBOL(i2c_detect);
EXPORT_SYMBOL(i2c_proc_real);
EXPORT_SYMBOL(i2c_register_entry);
EXPORT_SYMBOL(i2c_sysctl_real);
-#ifdef MODULE
-
MODULE_AUTHOR("Frodo Looijaard <frodol@dds.nl>");
MODULE_DESCRIPTION("i2c-proc driver");
MODULE_LICENSE("GPL");
-int i2c_cleanup(void)
-{
- if (i2c_initialized >= 1) {
- unregister_sysctl_table(i2c_proc_header);
- i2c_initialized--;
- }
- return 0;
-}
-
-int init_module(void)
-{
- return sensors_init();
-}
-
-int cleanup_module(void)
-{
- return i2c_cleanup();
-}
-#endif /* MODULE */
+module_init(i2c_proc_init);
+module_exit(i2c_proc_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-sibyte.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-sibyte.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-sibyte.c Mon Aug 25 13:44:41 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-sibyte.c Mon Dec 22 22:04:00 2003
@@ -82,7 +82,7 @@
}
};
-int __init i2c_sibyte_init(void)
+static int __init i2c_sibyte_init(void)
{
printk("i2c-swarm.o: i2c SMBus adapter module for SiByte board\n");
if (i2c_sibyte_add_bus(&sibyte_board_adapter[0], K_SMB_FREQ_100KHZ) < 0)
@@ -92,23 +92,17 @@
return 0;
}
+static void __exit i2c_sibyte_exit(void)
+{
+ i2c_sibyte_del_bus(&sibyte_board_adapter[0]);
+ i2c_sibyte_del_bus(&sibyte_board_adapter[1]);
+}
EXPORT_NO_SYMBOLS;
-#ifdef MODULE
MODULE_AUTHOR("Kip Walker, Broadcom Corp.");
MODULE_DESCRIPTION("SMBus adapter routines for SiByte boards");
MODULE_LICENSE("GPL");
-int init_module(void)
-{
- return i2c_sibyte_init();
-}
-
-void cleanup_module(void)
-{
- i2c_sibyte_del_bus(&sibyte_board_adapter[0]);
- i2c_sibyte_del_bus(&sibyte_board_adapter[1]);
-}
-
-#endif
+module_init(i2c_sibyte_init);
+module_exit(i2c_sibyte_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-velleman.c linux-2.4.24-pre2-k1/drivers/i2c/i2c-velleman.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-velleman.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/i2c-velleman.c Mon Dec 22 22:04:00 2003
@@ -103,12 +103,6 @@
return 0;
}
-static void __exit bit_velle_exit(void)
-{
- release_region( base , (base == 0x3bc)? 3 : 8 );
-}
-
-
static int bit_velle_reg(struct i2c_client *client)
{
return 0;
@@ -158,7 +152,7 @@
bit_velle_unreg,
};
-int __init i2c_bitvelle_init(void)
+static int __init i2c_bitvelle_init(void)
{
printk(KERN_INFO "i2c-velleman.o: i2c Velleman K8000 adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
if (base==0) {
@@ -184,24 +178,19 @@
return 0;
}
+static void __exit i2c_bitvelle_exit(void)
+{
+ i2c_bit_del_bus(&bit_velle_ops);
+ release_region(base, (base == 0x3bc) ? 3 : 8);
+}
+
EXPORT_NO_SYMBOLS;
-#ifdef MODULE
MODULE_AUTHOR("Simon G. Vogl <simon@tk.uni-linz.ac.at>");
MODULE_DESCRIPTION("I2C-Bus adapter routines for Velleman K8000 adapter");
MODULE_LICENSE("GPL");
MODULE_PARM(base, "i");
-int init_module(void)
-{
- return i2c_bitvelle_init();
-}
-
-void cleanup_module(void)
-{
- i2c_bit_del_bus(&bit_velle_ops);
- bit_velle_exit();
-}
-
-#endif
+module_init(i2c_bitvelle_init);
+module_exit(i2c_bitvelle_exit);
diff -ruN linux-2.4.24-pre2/drivers/i2c/scx200_i2c.c linux-2.4.24-pre2-k1/drivers/i2c/scx200_i2c.c
--- linux-2.4.24-pre2/drivers/i2c/scx200_i2c.c Fri Jun 13 16:51:33 2003
+++ linux-2.4.24-pre2-k1/drivers/i2c/scx200_i2c.c Mon Dec 22 22:04:00 2003
@@ -110,7 +110,7 @@
.client_unregister = scx200_i2c_unreg,
};
-int scx200_i2c_init(void)
+static int __init scx200_i2c_init(void)
{
printk(KERN_DEBUG NAME ": NatSemi SCx200 I2C Driver\n");
@@ -140,7 +140,7 @@
return 0;
}
-void scx200_i2c_cleanup(void)
+static void __exit scx200_i2c_cleanup(void)
{
i2c_bit_del_bus(&scx200_i2c_ops);
}
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2.4] i2c cleanups, second wave (2/5)
2003-12-24 21:57 [PATCH 2.4] i2c cleanups, second wave Jean Delvare
2003-12-24 22:12 ` [PATCH 2.4] i2c cleanups, second wave (1/5) Jean Delvare
@ 2003-12-24 22:32 ` Jean Delvare
2003-12-24 22:42 ` [PATCH 2.4] i2c cleanups, second wave (3/5) Jean Delvare
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2003-12-24 22:32 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: LKML, LM Sensors
This patch drops almost all compatibility stuff that was leftover from
times of kernel 2.2. A few extra includes may have survived, we will
take care of them later.
Most of the work was done by Kyösti Mälkki. Original comment follows:
***
Remove code for KERNEL_VERSION tests.
***
Note that this patch was voluntarily generated using diff -U1, because
it contains only removals, so much context isn't required. Doing so
makes this patch apply successfully even if you don't apply the patch #1
of this second wave first.
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-adap-ite.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-adap-ite.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-adap-ite.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-adap-ite.c Tue Dec 23 19:02:05 2003
@@ -40,3 +40,2 @@
#include <linux/slab.h>
-#include <linux/version.h>
#include <linux/init.h>
@@ -63,7 +62,3 @@
static struct iic_ite gpi;
-#if (LINUX_VERSION_CODE < 0x020301)
-static struct wait_queue *iic_wait = NULL;
-#else
static wait_queue_head_t iic_wait;
-#endif
static int iic_pending;
@@ -273,5 +268,2 @@
iic_ite_data.data = (void *)piic;
-#if (LINUX_VERSION_CODE >= 0x020301)
- init_waitqueue_head(&iic_wait);
-#endif
if (iic_hw_resrc_init() == 0) {
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-bit.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-algo-bit.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-bit.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-algo-bit.c Tue Dec 23 19:02:05 2003
@@ -29,3 +29,2 @@
#include <linux/slab.h>
-#include <linux/version.h>
#include <linux/init.h>
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-ite.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-algo-ite.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-ite.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-algo-ite.c Tue Dec 23 19:02:05 2003
@@ -40,3 +40,2 @@
#include <linux/slab.h>
-#include <linux/version.h>
#include <linux/init.h>
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-pcf.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-algo-pcf.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-algo-pcf.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-algo-pcf.c Tue Dec 23 19:02:05 2003
@@ -33,3 +33,2 @@
#include <linux/slab.h>
-#include <linux/version.h>
#include <linux/init.h>
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-core.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-core.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-core.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-core.c Tue Dec 23 19:02:05 2003
@@ -35,9 +35,4 @@
-#include <linux/version.h>
#include <linux/init.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)
-#define init_MUTEX(s) do { *(s) = MUTEX; } while(0)
-#endif
-
#include <asm/uaccess.h>
@@ -86,6 +81,2 @@
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,27))
-static void monitor_bus_i2c(struct inode *inode, int fill);
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */
-
static ssize_t i2cproc_bus_read(struct file * file, char * buf,size_t count,
@@ -101,8 +92,2 @@
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,3,48))
-static struct inode_operations i2cproc_inode_operations = {
- &i2cproc_operations
-};
-#endif
-
static int i2cproc_initialized = 0;
@@ -166,12 +151,4 @@
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,48))
proc_entry->proc_fops = &i2cproc_operations;
-#else
- proc_entry->ops = &i2cproc_inode_operations;
-#endif
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,27))
proc_entry->owner = THIS_MODULE;
-#else
- proc_entry->fill_inode = &monitor_bus_i2c;
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,58)) */
adap->inode = proc_entry->low_ino;
@@ -613,14 +590,2 @@
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,27))
-/* Monitor access to /proc/bus/i2c*; make unloading i2c-proc impossible
- if some process still uses it or some file in it */
-void monitor_bus_i2c(struct inode *inode, int fill)
-{
- if (fill)
- MOD_INC_USE_COUNT;
- else
- MOD_DEC_USE_COUNT;
-}
-#endif /* (LINUX_VERSION_CODE <= KERNEL_VERSION(2,3,37)) */
-
/* This function generates the output for /proc/bus/i2c */
@@ -734,7 +699,3 @@
proc_bus_i2c->read_proc = &read_bus_i2c;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,27))
proc_bus_i2c->owner = THIS_MODULE;
-#else
- proc_bus_i2c->fill_inode = &monitor_bus_i2c;
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,27)) */
i2cproc_initialized += 2;
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-dev.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-dev.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-dev.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-dev.c Tue Dec 23 19:02:05 2003
@@ -37,6 +37,3 @@
#include <linux/slab.h>
-#include <linux/version.h>
-#if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0)
#include <linux/smp_lock.h>
-#endif /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */
#ifdef CONFIG_DEVFS_FS
@@ -57,5 +54,2 @@
-#if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,9)
-static loff_t i2cdev_lseek (struct file *file, loff_t offset, int origin);
-#endif
static ssize_t i2cdev_read (struct file *file, char *buf, size_t count,
@@ -79,10 +73,4 @@
static struct file_operations i2cdev_fops = {
-#if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0)
owner: THIS_MODULE,
-#endif /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */
-#if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,9)
- llseek: i2cdev_lseek,
-#else
llseek: no_llseek,
-#endif
read: i2cdev_read,
@@ -124,16 +112,2 @@
-#if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,9)
-/* Note that the lseek function is called llseek in 2.1 kernels. But things
- are complicated enough as is. */
-loff_t i2cdev_lseek (struct file *file, loff_t offset, int origin)
-{
-#ifdef DEBUG
- struct inode *inode = file->f_dentry->d_inode;
- printk("i2c-dev.o: i2c-%d lseek to %ld bytes relative to %d.\n",
- MINOR(inode->i_rdev),(long) offset,origin);
-#endif /* DEBUG */
- return -ESPIPE;
-}
-#endif
-
static ssize_t i2cdev_read (struct file *file, char *buf, size_t count,
@@ -425,5 +399,2 @@
i2cdev_adaps[minor]->inc_use(i2cdev_adaps[minor]);
-#if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0)
- MOD_INC_USE_COUNT;
-#endif /* LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) */
@@ -443,12 +414,6 @@
#endif
-#if LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0)
- MOD_DEC_USE_COUNT;
-#else /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */
lock_kernel();
-#endif /* LINUX_KERNEL_VERSION < KERNEL_VERSION(2,4,0) */
if (i2cdev_adaps[minor]->dec_use)
i2cdev_adaps[minor]->dec_use(i2cdev_adaps[minor]);
-#if LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0)
unlock_kernel();
-#endif /* LINUX_KERNEL_VERSION >= KERNEL_VERSION(2,4,0) */
return 0;
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-elektor.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-elektor.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-elektor.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-elektor.c Tue Dec 23 19:02:05 2003
@@ -32,3 +32,2 @@
#include <linux/slab.h>
-#include <linux/version.h>
#include <linux/init.h>
@@ -57,7 +56,3 @@
-#if (LINUX_VERSION_CODE < 0x020301)
-static struct wait_queue *pcf_wait = NULL;
-#else
static wait_queue_head_t pcf_wait;
-#endif
static int pcf_pending;
@@ -270,5 +265,3 @@
-#if (LINUX_VERSION_CODE >= 0x020301)
init_waitqueue_head(&pcf_wait);
-#endif
if (pcf_isa_init() == 0) {
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-elv.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-elv.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-elv.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-elv.c Tue Dec 23 19:02:05 2003
@@ -29,3 +29,2 @@
#include <linux/slab.h>
-#include <linux/version.h>
#include <linux/init.h>
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-keywest.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-keywest.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-keywest.c Fri Nov 29 00:53:13 2002
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-keywest.c Tue Dec 23 19:02:05 2003
@@ -47,3 +47,2 @@
#include <linux/config.h>
-#include <linux/version.h>
#include <linux/kernel.h>
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-philips-par.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-philips-par.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-philips-par.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-philips-par.c Tue Dec 23 19:02:05 2003
@@ -248,3 +248,2 @@
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,4)
static struct parport_driver i2c_driver = {
@@ -255,3 +254,2 @@
};
-#endif
@@ -259,13 +257,5 @@
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,4)
- struct parport *port;
-#endif
printk(KERN_INFO "i2c-philips-par.o: i2c Philips parallel port adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,4)
parport_register_driver(&i2c_driver);
-#else
- for (port = parport_enumerate(); port; port=port->next)
- i2c_parport_attach(port);
-#endif
@@ -276,9 +266,3 @@
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,4)
parport_unregister_driver(&i2c_driver);
-#else
- struct parport *port;
- for (port = parport_enumerate(); port; port=port->next)
- i2c_parport_detach(port);
-#endif
}
diff -r -U1 linux-2.4.24-pre2-k1/drivers/i2c/i2c-proc.c linux-2.4.24-pre2-k2/drivers/i2c/i2c-proc.c
--- linux-2.4.24-pre2-k1/drivers/i2c/i2c-proc.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k2/drivers/i2c/i2c-proc.c Tue Dec 23 19:02:05 2003
@@ -25,3 +25,2 @@
-#include <linux/version.h>
#include <linux/module.h>
@@ -63,6 +62,2 @@
static unsigned short i2c_inodes[SENSORS_ENTRY_MAX];
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)
-static void i2c_fill_inode(struct inode *inode, int fill);
-static void i2c_dir_fill_inode(struct inode *inode, int fill);
-#endif /* LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1) */
@@ -196,8 +191,3 @@
new_header->ctl_table->child->child->de->low_ino;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,27))
new_header->ctl_table->child->child->de->owner = controlling_mod;
-#else
- new_header->ctl_table->child->child->de->fill_inode =
- &i2c_dir_fill_inode;
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,27)) */
@@ -863,8 +853,3 @@
register_sysctl_table(i2c_proc, 0))) return -ENOMEM;
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1))
i2c_proc_header->ctl_table->child->de->owner = THIS_MODULE;
-#else
- i2c_proc_header->ctl_table->child->de->fill_inode =
- &i2c_fill_inode;
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,1)) */
i2c_initialized++;
diff -r -U1 linux-2.4.24-pre2-k1/include/linux/i2c.h linux-2.4.24-pre2-k2/include/linux/i2c.h
--- linux-2.4.24-pre2-k1/include/linux/i2c.h Mon Dec 22 22:20:29 2003
+++ linux-2.4.24-pre2-k2/include/linux/i2c.h Tue Dec 23 20:05:40 2003
@@ -44,13 +44,3 @@
-#include <linux/version.h>
-#ifndef KERNEL_VERSION
-#define KERNEL_VERSION(a,b,c) (((a) << 16) | ((b) << 8) | (c))
-#endif
-
-#include <asm/page.h> /* for 2.2.xx */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,0,25)
-#include <linux/sched.h>
-#else
#include <asm/semaphore.h>
-#endif
#include <linux/config.h>
@@ -228,6 +218,2 @@
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)
-struct proc_dir_entry;
-#endif
-
/*
@@ -269,5 +255,2 @@
int inode;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)
- struct proc_dir_entry *proc_entry;
-#endif
#endif /* def CONFIG_PROC_FS */
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2.4] i2c cleanups, second wave (3/5)
2003-12-24 21:57 [PATCH 2.4] i2c cleanups, second wave Jean Delvare
2003-12-24 22:12 ` [PATCH 2.4] i2c cleanups, second wave (1/5) Jean Delvare
2003-12-24 22:32 ` [PATCH 2.4] i2c cleanups, second wave (2/5) Jean Delvare
@ 2003-12-24 22:42 ` Jean Delvare
2003-12-24 23:03 ` [PATCH 2.4] i2c cleanups, second wave (4/5) Jean Delvare
2003-12-24 23:11 ` [PATCH 2.4] i2c cleanups, second wave (5/5) Jean Delvare
4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2003-12-24 22:42 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: LKML, LM Sensors
This patch updates the i2c-core locking mechanism.
Most of the work was done by Kyösti Mälkki. Original comment follows:
***
Replace use of ADAP_LOCK and DRV_LOCK with down(&core_lists).
In many cases we need both, some return path forgot UNLOCK, and locks
were claimed in varying order and sometimes not at all.
Replace use of I2C_LOCK with down(&adapter->bus).
Remove unused adapter, driver and client counts.
***
>From Kyösti's original patch, I removed a few things that did not
stricly belong to it. A few locks are still missing, even after applying
this patch. All these changes will be merged into a more generic
i2c-core code cleanup patch, to be submitted later.
diff -ru linux-2.4.24-pre2-k2/drivers/i2c/i2c-core.c linux-2.4.24-pre2-k3/drivers/i2c/i2c-core.c
--- linux-2.4.24-pre2-k2/drivers/i2c/i2c-core.c Tue Dec 23 19:02:05 2003
+++ linux-2.4.24-pre2-k3/drivers/i2c/i2c-core.c Wed Dec 24 19:04:55 2003
@@ -39,32 +39,14 @@
/* ----- global defines ---------------------------------------------------- */
-/* exclusive access to the bus */
-#define I2C_LOCK(adap) down(&adap->lock)
-#define I2C_UNLOCK(adap) up(&adap->lock)
-
-#define ADAP_LOCK() down(&adap_lock)
-#define ADAP_UNLOCK() up(&adap_lock)
-
-#define DRV_LOCK() down(&driver_lock)
-#define DRV_UNLOCK() up(&driver_lock)
-
#define DEB(x) if (i2c_debug>=1) x;
#define DEB2(x) if (i2c_debug>=2) x;
/* ----- global variables -------------------------------------------------- */
-/**** lock for writing to global variables: the adapter & driver list */
-struct semaphore adap_lock;
-struct semaphore driver_lock;
-
-/**** adapter list */
+DECLARE_MUTEX(core_lists);
static struct i2c_adapter *adapters[I2C_ADAP_MAX];
-static int adap_count;
-
-/**** drivers list */
static struct i2c_driver *drivers[I2C_DRIVER_MAX];
-static int driver_count;
/**** debug level */
static int i2c_debug=1;
@@ -112,9 +94,9 @@
*/
int i2c_add_adapter(struct i2c_adapter *adap)
{
- int i,j,res;
+ int i,j,res = 0;
- ADAP_LOCK();
+ down(&core_lists);
for (i = 0; i < I2C_ADAP_MAX; i++)
if (NULL == adapters[i])
break;
@@ -127,11 +109,10 @@
}
adapters[i] = adap;
- adap_count++;
- ADAP_UNLOCK();
/* init data types */
- init_MUTEX(&adap->lock);
+ init_MUTEX(&adap->bus);
+ init_MUTEX(&adap->list);
#ifdef CONFIG_PROC_FS
@@ -146,7 +127,7 @@
printk("i2c-core.o: Could not create /proc/bus/%s\n",
name);
res = -ENOENT;
- goto ERROR1;
+ goto ERROR0;
}
proc_entry->proc_fops = &i2cproc_operations;
@@ -157,36 +138,25 @@
#endif /* def CONFIG_PROC_FS */
/* inform drivers of new adapters */
- DRV_LOCK();
for (j=0;j<I2C_DRIVER_MAX;j++)
if (drivers[j]!=NULL &&
(drivers[j]->flags&(I2C_DF_NOTIFY|I2C_DF_DUMMY)))
/* We ignore the return code; if it fails, too bad */
drivers[j]->attach_adapter(adap);
- DRV_UNLOCK();
DEB(printk(KERN_DEBUG "i2c-core.o: adapter %s registered as adapter %d.\n",
adap->name,i));
-
- return 0;
-
-
-ERROR1:
- ADAP_LOCK();
- adapters[i] = NULL;
- adap_count--;
ERROR0:
- ADAP_UNLOCK();
+ up(&core_lists);
return res;
}
int i2c_del_adapter(struct i2c_adapter *adap)
{
- int i,j,res;
-
- ADAP_LOCK();
+ int i,j,res = 0;
+ down(&core_lists);
for (i = 0; i < I2C_ADAP_MAX; i++)
if (adap == adapters[i])
break;
@@ -202,17 +172,14 @@
* *detach* it! Of course, each dummy driver should know about
* this or hell will break loose...
*/
- DRV_LOCK();
for (j = 0; j < I2C_DRIVER_MAX; j++)
if (drivers[j] && (drivers[j]->flags & I2C_DF_DUMMY))
if ((res = drivers[j]->attach_adapter(adap))) {
printk(KERN_WARNING "i2c-core.o: can't detach adapter %s "
"while detaching driver %s: driver not "
"detached!",adap->name,drivers[j]->name);
- goto ERROR1;
+ goto ERROR0;
}
- DRV_UNLOCK();
-
/* detach any active clients. This must be done first, because
* it can fail; in which case we give upp. */
@@ -240,17 +207,9 @@
#endif /* def CONFIG_PROC_FS */
adapters[i] = NULL;
- adap_count--;
-
- ADAP_UNLOCK();
DEB(printk(KERN_DEBUG "i2c-core.o: adapter unregistered: %s\n",adap->name));
- return 0;
-
ERROR0:
- ADAP_UNLOCK();
- return res;
-ERROR1:
- DRV_UNLOCK();
+ up(&core_lists);
return res;
}
@@ -264,7 +223,8 @@
int i2c_add_driver(struct i2c_driver *driver)
{
int i;
- DRV_LOCK();
+
+ down(&core_lists);
for (i = 0; i < I2C_DRIVER_MAX; i++)
if (NULL == drivers[i])
break;
@@ -273,19 +233,12 @@
" i2c-core.o: register_driver(%s) "
"- enlarge I2C_DRIVER_MAX.\n",
driver->name);
- DRV_UNLOCK();
+ up(&core_lists);
return -ENOMEM;
}
-
drivers[i] = driver;
- driver_count++;
-
- DRV_UNLOCK(); /* driver was successfully added */
-
DEB(printk(KERN_DEBUG "i2c-core.o: driver %s registered.\n",driver->name));
- ADAP_LOCK();
-
/* now look for instances of driver on our adapters
*/
if (driver->flags& (I2C_DF_NOTIFY|I2C_DF_DUMMY)) {
@@ -294,15 +247,15 @@
/* Ignore errors */
driver->attach_adapter(adapters[i]);
}
- ADAP_UNLOCK();
+ up(&core_lists);
return 0;
}
int i2c_del_driver(struct i2c_driver *driver)
{
- int i,j,k,res;
+ int i,j,k,res = 0;
- DRV_LOCK();
+ down(&core_lists);
for (i = 0; i < I2C_DRIVER_MAX; i++)
if (driver == drivers[i])
break;
@@ -310,7 +263,7 @@
printk(KERN_WARNING " i2c-core.o: unregister_driver: "
"[%s] not found\n",
driver->name);
- DRV_UNLOCK();
+ up(&core_lists);
return -ENODEV;
}
/* Have a look at each adapter, if clients of this driver are still
@@ -322,7 +275,6 @@
* invalid operation might (will!) result, when using stale client
* pointers.
*/
- ADAP_LOCK(); /* should be moved inside the if statement... */
for (k=0;k<I2C_ADAP_MAX;k++) {
struct i2c_adapter *adap = adapters[k];
if (adap == NULL) /* skip empty entries. */
@@ -341,8 +293,7 @@
"not be detached properly; driver "
"not unloaded!",driver->name,
adap->name);
- ADAP_UNLOCK();
- return res;
+ goto ERROR0;
}
} else {
for (j=0;j<I2C_CLIENT_MAX;j++) {
@@ -365,31 +316,41 @@
driver->name,
client->addr,
adap->name);
- ADAP_UNLOCK();
- return res;
+ goto ERROR0;
}
}
}
}
}
- ADAP_UNLOCK();
drivers[i] = NULL;
- driver_count--;
- DRV_UNLOCK();
-
DEB(printk(KERN_DEBUG "i2c-core.o: driver unregistered: %s\n",driver->name));
- return 0;
+
+ERROR0:
+ up(&core_lists);
+ return res;
}
-int i2c_check_addr (struct i2c_adapter *adapter, int addr)
+static int __i2c_check_addr (struct i2c_adapter *adapter, int addr)
{
int i;
for (i = 0; i < I2C_CLIENT_MAX ; i++)
if (adapter->clients[i] && (adapter->clients[i]->addr == addr))
return -EBUSY;
+
return 0;
}
+int i2c_check_addr (struct i2c_adapter *adapter, int addr)
+{
+ int rval;
+
+ down(&adapter->list);
+ rval = __i2c_check_addr(adapter, addr);
+ up(&adapter->list);
+
+ return rval;
+}
+
int i2c_attach_client(struct i2c_client *client)
{
struct i2c_adapter *adapter = client->adapter;
@@ -398,6 +359,7 @@
if (i2c_check_addr(client->adapter,client->addr))
return -EBUSY;
+ down(&adapter->list);
for (i = 0; i < I2C_CLIENT_MAX; i++)
if (NULL == adapter->clients[i])
break;
@@ -405,11 +367,11 @@
printk(KERN_WARNING
" i2c-core.o: attach_client(%s) - enlarge I2C_CLIENT_MAX.\n",
client->name);
+ up(&adapter->list);
return -ENOMEM;
}
-
adapter->clients[i] = client;
- adapter->client_count++;
+ up(&adapter->list);
if (adapter->client_register)
if (adapter->client_register(client))
@@ -431,6 +393,7 @@
struct i2c_adapter *adapter = client->adapter;
int i,res;
+ down(&adapter->list);
for (i = 0; i < I2C_CLIENT_MAX; i++)
if (client == adapter->clients[i])
break;
@@ -438,6 +401,7 @@
printk(KERN_WARNING " i2c-core.o: unregister_client "
"[%s] not found\n",
client->name);
+ up(&adapter->list);
return -ENODEV;
}
@@ -453,7 +417,7 @@
}
adapter->clients[i] = NULL;
- adapter->client_count--;
+ up(&adapter->list);
DEB(printk(KERN_DEBUG "i2c-core.o: client [%s] unregistered.\n",client->name));
return 0;
@@ -595,6 +559,7 @@
int i;
int nr = 0;
/* Note that it is safe to write a `little' beyond len. Yes, really. */
+ down(&core_lists);
for (i = 0; (i < I2C_ADAP_MAX) && (nr < len); i++)
if (adapters[i]) {
nr += sprintf(buf+nr, "i2c-%d\t", i);
@@ -611,6 +576,7 @@
adapters[i]->name,
adapters[i]->algo->name);
}
+ up(&core_lists);
return nr;
}
@@ -728,9 +694,9 @@
DEB2(printk(KERN_DEBUG "i2c-core.o: master_xfer: %s with %d msgs.\n",
adap->name,num));
- I2C_LOCK(adap);
+ down(&adap->bus);
ret = adap->algo->master_xfer(adap,msgs,num);
- I2C_UNLOCK(adap);
+ up(&adap->bus);
return ret;
} else {
@@ -755,9 +721,9 @@
DEB2(printk(KERN_DEBUG "i2c-core.o: master_send: writing %d bytes on %s.\n",
count,client->adapter->name));
- I2C_LOCK(adap);
+ down(&adap->bus);
ret = adap->algo->master_xfer(adap,&msg,1);
- I2C_UNLOCK(adap);
+ up(&adap->bus);
/* if everything went ok (i.e. 1 msg transmitted), return #bytes
* transmitted, else error code.
@@ -785,9 +751,9 @@
DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: reading %d bytes on %s.\n",
count,client->adapter->name));
- I2C_LOCK(adap);
+ down(&adap->bus);
ret = adap->algo->master_xfer(adap,&msg,1);
- I2C_UNLOCK(adap);
+ up(&adap->bus);
DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: return:%d (count:%d, addr:0x%02x)\n",
ret, count, client->addr));
@@ -1195,10 +1161,10 @@
s32 res;
flags = flags & I2C_M_TEN;
if (adapter->algo->smbus_xfer) {
- I2C_LOCK(adapter);
+ down(&adapter->bus);
res = adapter->algo->smbus_xfer(adapter,addr,flags,read_write,
command,size,data);
- I2C_UNLOCK(adapter);
+ up(&adapter->bus);
} else
res = i2c_smbus_xfer_emulated(adapter,addr,flags,read_write,
command,size,data);
@@ -1228,12 +1194,7 @@
printk(KERN_INFO "i2c-core.o: i2c core module version %s (%s)\n", I2C_VERSION, I2C_DATE);
memset(adapters,0,sizeof(adapters));
memset(drivers,0,sizeof(drivers));
- adap_count=0;
- driver_count=0;
- init_MUTEX(&adap_lock);
- init_MUTEX(&driver_lock);
-
#ifdef CONFIG_PROC_FS
return i2cproc_init();
#else
diff -ru linux-2.4.24-pre2-k2/drivers/i2c/i2c-sibyte.c linux-2.4.24-pre2-k3/drivers/i2c/i2c-sibyte.c
--- linux-2.4.24-pre2-k2/drivers/i2c/i2c-sibyte.c Mon Dec 22 22:04:00 2003
+++ linux-2.4.24-pre2-k3/drivers/i2c/i2c-sibyte.c Wed Dec 24 19:04:55 2003
@@ -67,7 +67,6 @@
dec_use: sibyte_dec_use,
client_register: sibyte_reg,
client_unregister: sibyte_unreg,
- client_count: 0
} ,
{
name: "SiByte SMBus 1",
@@ -78,7 +77,6 @@
dec_use: sibyte_dec_use,
client_register: sibyte_reg,
client_unregister: sibyte_unreg,
- client_count: 0
}
};
diff -ru linux-2.4.24-pre2-k2/include/linux/i2c.h linux-2.4.24-pre2-k3/include/linux/i2c.h
--- linux-2.4.24-pre2-k2/include/linux/i2c.h Tue Dec 23 20:05:40 2003
+++ linux-2.4.24-pre2-k3/include/linux/i2c.h Wed Dec 24 20:12:52 2003
@@ -241,11 +241,11 @@
/* and can be set via the i2c_ioctl call */
/* data fields that are valid for all devices */
- struct semaphore lock;
+ struct semaphore bus;
+ struct semaphore list;
unsigned int flags;/* flags specifying div. data */
struct i2c_client *clients[I2C_CLIENT_MAX];
- int client_count;
int timeout;
int retries;
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2.4] i2c cleanups, second wave (4/5)
2003-12-24 21:57 [PATCH 2.4] i2c cleanups, second wave Jean Delvare
` (2 preceding siblings ...)
2003-12-24 22:42 ` [PATCH 2.4] i2c cleanups, second wave (3/5) Jean Delvare
@ 2003-12-24 23:03 ` Jean Delvare
2003-12-24 23:11 ` [PATCH 2.4] i2c cleanups, second wave (5/5) Jean Delvare
4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2003-12-24 23:03 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: LKML, LM Sensors
This patch doesn't really focus on the i2c subsystem, but one part of it
belongs to this subsystem. It fixes the dependancies between the various
SCx200 drivers, which happen to be incorrect at the time being. This is
a modified version of a patch I had previously submitted on the LKML,
but wasn't quite correct.
The patch also fixes Configure.help a bit for these drivers.
I've sent a similar (but smaller) patch to Greg KH for Linux 2.6, which
also has a few incorrectnesses in SCx200 driver dependancies.
Merry Christmas everyone :)
diff -ru linux-2.4.24-pre2/Documentation/Configure.help linux-2.4.24-pre2-k4/Documentation/Configure.help
--- linux-2.4.24-pre2/Documentation/Configure.help Tue Dec 23 22:19:41 2003
+++ linux-2.4.24-pre2-k4/Documentation/Configure.help Tue Dec 23 22:58:53 2003
@@ -28276,6 +28276,14 @@
This support is also available as a module. If compiled as a
module, it will be called scx200.o.
+NatSemi SCx200 GPIO support
+CONFIG_SCx200_GPIO
+ Give userspace access to the GPIO pins on the National
+ Semiconductor SCx200 processors.
+
+ This support is also available as a module. If compiled as a
+ module, it will be called scx200_gpio.o.
+
NatSemi SCx200 Watchdog
CONFIG_SCx200_WDT
Enable the built-in watchdog timer support on the National
@@ -28427,7 +28435,7 @@
If compiled as a module, it will be called uclinux.o.
NatSemi SCx200 I2C using GPIO pins
-CONFIG_SCx200_GPIO
+CONFIG_SCx200_I2C
Enable the use of two GPIO pins of a SCx200 processor as an I2C bus.
If you don't know what to do here, say N.
diff -ru linux-2.4.24-pre2/drivers/char/Config.in linux-2.4.24-pre2-k4/drivers/char/Config.in
--- linux-2.4.24-pre2/drivers/char/Config.in Tue Dec 23 22:19:41 2003
+++ linux-2.4.24-pre2-k4/drivers/char/Config.in Tue Dec 23 22:58:53 2003
@@ -285,7 +285,8 @@
fi
tristate 'NetWinder flash support' CONFIG_NWFLASH
fi
-dep_tristate 'NatSemi SCx200 GPIO Support' CONFIG_SCx200_GPIO $CONFIG_SCx200
+tristate 'NatSemi SCx200 Support' CONFIG_SCx200
+dep_tristate ' NatSemi SCx200 GPIO Support' CONFIG_SCx200_GPIO $CONFIG_SCx200
if [ "$CONFIG_IA64_GENERIC" = "y" -o "$CONFIG_IA64_SGI_SN2" = "y" ] ; then
bool 'SGI SN2 fetchop support' CONFIG_FETCHOP
diff -ru linux-2.4.24-pre2/drivers/char/Makefile linux-2.4.24-pre2-k4/drivers/char/Makefile
--- linux-2.4.24-pre2/drivers/char/Makefile Tue Dec 23 22:19:41 2003
+++ linux-2.4.24-pre2-k4/drivers/char/Makefile Tue Dec 23 22:58:53 2003
@@ -288,7 +288,8 @@
obj-$(CONFIG_DZ) += dz.o
obj-$(CONFIG_NWBUTTON) += nwbutton.o
obj-$(CONFIG_NWFLASH) += nwflash.o
-obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o scx200.o
+obj-$(CONFIG_SCx200) += scx200.o
+obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o
# Only one watchdog can succeed. We probe the hardware watchdog
# drivers first, then the softdog driver. This means if your hardware
diff -ru linux-2.4.24-pre2/drivers/i2c/Config.in linux-2.4.24-pre2-k4/drivers/i2c/Config.in
--- linux-2.4.24-pre2/drivers/i2c/Config.in Tue Dec 23 22:19:41 2003
+++ linux-2.4.24-pre2-k4/drivers/i2c/Config.in Tue Dec 23 22:58:53 2003
@@ -18,8 +18,9 @@
int ' GPIO pin used for SCL' CONFIG_SCx200_I2C_SCL 12
int ' GPIO pin used for SDA' CONFIG_SCx200_I2C_SDA 13
fi
- dep_tristate ' NatSemi SCx200 ACCESS.bus' CONFIG_SCx200_ACB $CONFIG_I2C
fi
+
+ dep_tristate 'NatSemi SCx200 ACCESS.bus' CONFIG_SCx200_ACB $CONFIG_I2C
dep_tristate 'I2C PCF 8584 interfaces' CONFIG_I2C_ALGOPCF $CONFIG_I2C
if [ "$CONFIG_I2C_ALGOPCF" != "n" ]; then
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2.4] i2c cleanups, second wave (5/5)
2003-12-24 21:57 [PATCH 2.4] i2c cleanups, second wave Jean Delvare
` (3 preceding siblings ...)
2003-12-24 23:03 ` [PATCH 2.4] i2c cleanups, second wave (4/5) Jean Delvare
@ 2003-12-24 23:11 ` Jean Delvare
4 siblings, 0 replies; 6+ messages in thread
From: Jean Delvare @ 2003-12-24 23:11 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: LKML, LM Sensors
And finally, this patch adds documentation for the i2c-velleman driver,
and also fixes a typo (the device is refered to as K9000 in many places
while its real name is actually K8000).
I'll send a similar patch to Greg KH for Linux 2.6 in a few days.
Thanks!
diff -ruN linux-2.4.24-pre2/Documentation/Configure.help linux-2.4.24-pre2-k5/Documentation/Configure.help
--- linux-2.4.24-pre2/Documentation/Configure.help Tue Dec 23 22:19:41 2003
+++ linux-2.4.24-pre2-k5/Documentation/Configure.help Wed Dec 24 22:25:24 2003
@@ -19052,9 +19052,9 @@
<file:Documentation/modules.txt>.
The module will be called i2c-elv.o.
-Velleman K9000 adapter
+Velleman K8000 adapter
CONFIG_I2C_VELLEMAN
- This supports the Velleman K9000 parallel-port I2C adapter. Say Y
+ This supports the Velleman K8000 parallel-port I2C adapter. Say Y
if you own such an adapter.
This driver is also available as a module. If you want to compile
diff -ruN linux-2.4.24-pre2/Documentation/i2c/i2c-velleman linux-2.4.24-pre2-k5/Documentation/i2c/i2c-velleman
--- linux-2.4.24-pre2/Documentation/i2c/i2c-velleman Thu Jan 1 01:00:00 1970
+++ linux-2.4.24-pre2-k5/Documentation/i2c/i2c-velleman Wed Dec 24 22:25:24 2003
@@ -0,0 +1,23 @@
+i2c-velleman driver
+-------------------
+This is a driver for i2c-hw access for Velleman K8000 and other adapters.
+
+Useful links
+------------
+Velleman:
+ http://www.velleman.be/
+
+Velleman K8000 Howto:
+ http://howto.htlw16.ac.at/k8000-howto.html
+
+K8000 and K8005 libraries
+-------------------------
+The project has lead to new libs for the Velleman K8000 and K8005:
+LIBK8000 v1.99.1 and LIBK8005 v0.21
+
+With these libs, you can control the K8000 interface card and the K8005
+stepper motor card with the simple commands which are in the original
+Velleman software, like SetIOchannel, ReadADchannel, SendStepCCWFull and
+many more, using /dev/velleman.
+
+The libs can be found on http://groups.yahoo.com/group/k8000/files/linux/
diff -ruN linux-2.4.24-pre2/Documentation/i2c/summary linux-2.4.24-pre2-k5/Documentation/i2c/summary
--- linux-2.4.24-pre2/Documentation/i2c/summary Mon Dec 22 21:50:09 2003
+++ linux-2.4.24-pre2-k5/Documentation/i2c/summary Wed Dec 24 22:25:24 2003
@@ -71,5 +71,5 @@
i2c-ppc405: IBM 405xx processor I2C device (uses i2c-algo-ppc405) (NOT BUILT BY DEFAULT)
i2c-pport: Primitive parallel port adapter (uses i2c-algo-bit)
i2c-rpx: RPX board Motorola 8xx I2C device (uses i2c-algo-8xx) (NOT BUILT BY DEFAULT)
-i2c-velleman: Velleman K9000 parallel port adapter (uses i2c-algo-bit)
+i2c-velleman: Velleman K8000 parallel port adapter (uses i2c-algo-bit)
diff -ruN linux-2.4.24-pre2/drivers/i2c/Config.in linux-2.4.24-pre2-k5/drivers/i2c/Config.in
--- linux-2.4.24-pre2/drivers/i2c/Config.in Tue Dec 23 22:19:41 2003
+++ linux-2.4.24-pre2-k5/drivers/i2c/Config.in Wed Dec 24 22:25:47 2003
@@ -12,7 +12,7 @@
if [ "$CONFIG_I2C_ALGOBIT" != "n" ]; then
dep_tristate ' Philips style parallel port adapter' CONFIG_I2C_PHILIPSPAR $CONFIG_I2C_ALGOBIT $CONFIG_PARPORT
dep_tristate ' ELV adapter' CONFIG_I2C_ELV $CONFIG_I2C_ALGOBIT
- dep_tristate ' Velleman K9000 adapter' CONFIG_I2C_VELLEMAN $CONFIG_I2C_ALGOBIT
+ dep_tristate ' Velleman K8000 adapter' CONFIG_I2C_VELLEMAN $CONFIG_I2C_ALGOBIT
dep_tristate ' NatSemi SCx200 I2C using GPIO pins' CONFIG_SCx200_I2C $CONFIG_SCx200 $CONFIG_I2C_ALGOBIT
if [ "$CONFIG_SCx200_I2C" != "n" ]; then
int ' GPIO pin used for SCL' CONFIG_SCx200_I2C_SCL 12
diff -ruN linux-2.4.24-pre2/drivers/i2c/i2c-velleman.c linux-2.4.24-pre2-k5/drivers/i2c/i2c-velleman.c
--- linux-2.4.24-pre2/drivers/i2c/i2c-velleman.c Mon Dec 22 21:50:10 2003
+++ linux-2.4.24-pre2-k5/drivers/i2c/i2c-velleman.c Wed Dec 24 22:25:24 2003
@@ -1,5 +1,5 @@
/* ------------------------------------------------------------------------- */
-/* i2c-velleman.c i2c-hw access for Velleman K9000 adapters */
+/* i2c-velleman.c i2c-hw access for Velleman K8000 adapters */
/* ------------------------------------------------------------------------- */
/* Copyright (C) 1995-96, 2000 Simon G. Vogl
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-12-24 23:11 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-24 21:57 [PATCH 2.4] i2c cleanups, second wave Jean Delvare
2003-12-24 22:12 ` [PATCH 2.4] i2c cleanups, second wave (1/5) Jean Delvare
2003-12-24 22:32 ` [PATCH 2.4] i2c cleanups, second wave (2/5) Jean Delvare
2003-12-24 22:42 ` [PATCH 2.4] i2c cleanups, second wave (3/5) Jean Delvare
2003-12-24 23:03 ` [PATCH 2.4] i2c cleanups, second wave (4/5) Jean Delvare
2003-12-24 23:11 ` [PATCH 2.4] i2c cleanups, second wave (5/5) Jean Delvare
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox