From 35e3f46b0970bfd0e489d9311db94dadd0bf0263 Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Fri, 4 Dec 1998 15:16:49 +0000 Subject: [PATCH] This should solve the 2.1 kernel /proc/bus/i2c-? problem. The inode list that is used to determine which i2c-? file is accessed, was not initialized for 2.1 kernels due to a #endif statement that was one line too low :-( git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@32 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/i2c-proc.c | 5 +++-- src/i2c-proc.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/kernel/i2c-proc.c b/kernel/i2c-proc.c index bce69a5b..e472b757 100644 --- a/kernel/i2c-proc.c +++ b/kernel/i2c-proc.c @@ -370,10 +370,11 @@ int i2cproc_attach_adapter(struct i2c_adapter *adapter) kfree(client); return res; } - + i2cproc_proc_entries[i] = proc_entry; - i2cproc_inodes[i] = proc_entry->low_ino; #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) */ + + i2cproc_inodes[i] = proc_entry->low_ino; return 0; } diff --git a/src/i2c-proc.c b/src/i2c-proc.c index bce69a5b..e472b757 100644 --- a/src/i2c-proc.c +++ b/src/i2c-proc.c @@ -370,10 +370,11 @@ int i2cproc_attach_adapter(struct i2c_adapter *adapter) kfree(client); return res; } - + i2cproc_proc_entries[i] = proc_entry; - i2cproc_inodes[i] = proc_entry->low_ino; #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) */ + + i2cproc_inodes[i] = proc_entry->low_ino; return 0; }