From c4c4b363be6a057017bf45cd1b52968f2883a18c Mon Sep 17 00:00:00 2001 From: Frodo Looijaard Date: Wed, 24 Mar 1999 21:44:38 +0000 Subject: [PATCH] Made lm78 and w83781d drivers emit a warning when a 'force' parameter is used but ignored (because the driver could not determine what specific chip was there). git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@342 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/lm78.c | 6 +++++- kernel/chips/w83781d.c | 8 +++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/kernel/chips/lm78.c b/kernel/chips/lm78.c index 70ba7e60..e0f186df 100644 --- a/kernel/chips/lm78.c +++ b/kernel/chips/lm78.c @@ -385,8 +385,12 @@ int lm78_detect(struct i2c_adapter *adapter, int address, int kind) kind = lm78j; else if ((i & 0xfe) == 0xc0) kind = lm79; - else + else { + if (kind == 0) + printk("lm78.o: Ignoring 'force' parameter for unknown chip at " + "adapter %d, address 0x%02x\n",i2c_adapter_id(adapter),address); goto ERROR1; + } } if (kind == lm78) { diff --git a/kernel/chips/w83781d.c b/kernel/chips/w83781d.c index cbaad566..29bc1de3 100644 --- a/kernel/chips/w83781d.c +++ b/kernel/chips/w83781d.c @@ -621,6 +621,8 @@ int w83781d_detect(struct i2c_adapter *adapter, int address, int kind) const char *client_name = ""; int is_isa = i2c_is_isa_adapter(adapter); + printk("Detection: kind == %d\n",kind); + /* We need address registration for the I2C bus too. That is not yet implemented. */ if (is_isa) { @@ -715,8 +717,12 @@ int w83781d_detect(struct i2c_adapter *adapter, int address, int kind) kind = w83782d; else if (val1 == 0x40) kind = w83783s; - else + else { + if (kind == 0) + printk("w83781d.o: Ignoring 'force' parameter for unknown chip at" + "adapter %d, address 0x%02x\n",i2c_adapter_id(adapter),address); goto ERROR1; + } } if (kind == w83781d) {