i2c-proc bug resolved

git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@147 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Frodo Looijaard committed 1999-01-07 20:07:15 +00:00
1 parent 1d12298e93
commit dabc5bfbb6
3 files changed
+22 -4

No files matched your search

+4
View File
@@ -13,6 +13,10 @@ ask CVS about it:
for example:
cvs diff -r V2-0-0 -r V2-0-1 -u
2.1.1 (19990107)
Module i2c-proc.o: Hack to make /proc/bus/ possible for kernels 2.0.35
and older
Module gl518sm.o: Miscelaneous bugs and problems solved
2.1.0 (19981230)
Library: Completely NEW
+9 -2
View File
@@ -70,7 +70,9 @@ static struct proc_dir_entry proc_bus_dir =
/* uid */ 0,
/* gid */ 0,
/* size */ 0,
/* ops */ &proc_dir_inode_operations,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36))
/* ops */ &proc_dir_inode_operations,
#endif
};
static struct proc_dir_entry proc_bus_i2c_dir =
@@ -170,7 +172,12 @@ int i2cproc_init(void)
i2cproc_initialized += 2;
#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */
/* In Linux 2.0.x, there is no /proc/bus! But I hope no other module
introduced it, or we are fucked. */
introduced it, or we are fucked. And 2.0.35 and earlier does not
export proc_dir_inode_operations, so we grab it from proc_net,
which also uses it. Not nice. */
/* #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,0,36) */
proc_bus_dir.ops = proc_net.ops;
/* #endif */
if ((res = proc_register_dynamic(&proc_root, &proc_bus_dir))) {
printk("i2c-proc.o: Could not create /proc/bus/, module not inserted.\n");
i2cproc_cleanup();
+9 -2
View File
@@ -70,7 +70,9 @@ static struct proc_dir_entry proc_bus_dir =
/* uid */ 0,
/* gid */ 0,
/* size */ 0,
/* ops */ &proc_dir_inode_operations,
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,0,36))
/* ops */ &proc_dir_inode_operations,
#endif
};
static struct proc_dir_entry proc_bus_i2c_dir =
@@ -170,7 +172,12 @@ int i2cproc_init(void)
i2cproc_initialized += 2;
#else /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,1,29)) */
/* In Linux 2.0.x, there is no /proc/bus! But I hope no other module
introduced it, or we are fucked. */
introduced it, or we are fucked. And 2.0.35 and earlier does not
export proc_dir_inode_operations, so we grab it from proc_net,
which also uses it. Not nice. */
/* #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,0,36) */
proc_bus_dir.ops = proc_net.ops;
/* #endif */
if ((res = proc_register_dynamic(&proc_root, &proc_bus_dir))) {
printk("i2c-proc.o: Could not create /proc/bus/, module not inserted.\n");
i2cproc_cleanup();