From 61d74f13e0c3e3a8bf6b0bb289c8ce46a0c230e1 Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Sat, 5 Dec 1998 16:12:47 +0000 Subject: [PATCH] Minor fixes * /proc/bus/i2c printed garbage if more than one adapter was registered * There was a double line in piix4.c in the delay function git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@38 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/busses/i2c-piix4.c | 1 - kernel/i2c-proc.c | 3 +-- src/i2c-proc.c | 3 +-- src/piix4.c | 1 - 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/kernel/busses/i2c-piix4.c b/kernel/busses/i2c-piix4.c index aaa18d81..81a3e8a6 100644 --- a/kernel/busses/i2c-piix4.c +++ b/kernel/busses/i2c-piix4.c @@ -193,7 +193,6 @@ END: /* Internally used pause function */ void piix4_do_pause( unsigned int amount ) { - current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE; schedule_timeout(amount); } diff --git a/kernel/i2c-proc.c b/kernel/i2c-proc.c index e472b757..7512ca7b 100644 --- a/kernel/i2c-proc.c +++ b/kernel/i2c-proc.c @@ -235,7 +235,7 @@ int read_bus_i2c(char *buf, char **start, off_t offset, int len, int unused) len = 0; for (i = 0; i < I2C_ADAP_MAX; i++) if (i2cproc_adapters[i]) - len += sprintf(buf, "i2c-%d\t%s\t%-32s\t%-32s\n",i, + len += sprintf(buf+len, "i2c-%d\t%s\t%-32s\t%-32s\n",i, i2c_is_smbus_adapter(i2cproc_adapters[i])?"smbus": #ifdef DEBUG i2c_is_isa_adapter(i2cproc_adapters[i])?"isa": @@ -385,7 +385,6 @@ int i2cproc_detach_client(struct i2c_client *client) char name[8]; #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) */ - printk("OK!\n"); #ifndef DEBUG if (i2c_is_isa_client(client)) return 0; diff --git a/src/i2c-proc.c b/src/i2c-proc.c index e472b757..7512ca7b 100644 --- a/src/i2c-proc.c +++ b/src/i2c-proc.c @@ -235,7 +235,7 @@ int read_bus_i2c(char *buf, char **start, off_t offset, int len, int unused) len = 0; for (i = 0; i < I2C_ADAP_MAX; i++) if (i2cproc_adapters[i]) - len += sprintf(buf, "i2c-%d\t%s\t%-32s\t%-32s\n",i, + len += sprintf(buf+len, "i2c-%d\t%s\t%-32s\t%-32s\n",i, i2c_is_smbus_adapter(i2cproc_adapters[i])?"smbus": #ifdef DEBUG i2c_is_isa_adapter(i2cproc_adapters[i])?"isa": @@ -385,7 +385,6 @@ int i2cproc_detach_client(struct i2c_client *client) char name[8]; #endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,29)) */ - printk("OK!\n"); #ifndef DEBUG if (i2c_is_isa_client(client)) return 0; diff --git a/src/piix4.c b/src/piix4.c index aaa18d81..81a3e8a6 100644 --- a/src/piix4.c +++ b/src/piix4.c @@ -193,7 +193,6 @@ END: /* Internally used pause function */ void piix4_do_pause( unsigned int amount ) { - current->state = TASK_INTERRUPTIBLE; current->state = TASK_INTERRUPTIBLE; schedule_timeout(amount); }