From 03e12c8b80e55a6c6e03059ac94be259fdf24d3f Mon Sep 17 00:00:00 2001 From: "Mark D. Studebaker" Date: Thu, 2 Nov 2000 02:56:37 +0000 Subject: [PATCH] (mds) allow force and force_ddcmon parameters to bypass detection git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@923 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/ddcmon.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/kernel/chips/ddcmon.c b/kernel/chips/ddcmon.c index 9fe3b5fa..505f67d8 100644 --- a/kernel/chips/ddcmon.c +++ b/kernel/chips/ddcmon.c @@ -185,13 +185,17 @@ int ddcmon_detect(struct i2c_adapter *adapter, int address, /* Now, we do the remaining detection. */ /* Verify the first 8 locations 0x00FFFFFFFFFFFF00 */ - for(i = 0; i < 8; i++) { - cs = i2c_smbus_read_byte_data(new_client, i); - if(i == 0 || i == 7) { - if(cs != 0) + /* Allow force and force_ddcmon arguments */ + if(kind < 0) + { + for(i = 0; i < 8; i++) { + cs = i2c_smbus_read_byte_data(new_client, i); + if(i == 0 || i == 7) { + if(cs != 0) + goto ERROR1; + } else if(cs != 0xff) goto ERROR1; - } else if(cs != 0xff) - goto ERROR1; + } } type_name = "ddcmon";