From 37b65044feb80f4d8d8f98d5e6dfff6d688b6254 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Mon, 11 Apr 2005 21:06:48 +0000 Subject: [PATCH] Do not assume anything on subclient addresses. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@2966 7894878c-1315-0410-8ee3-d5d059ff63e0 --- kernel/chips/w83792d.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/kernel/chips/w83792d.c b/kernel/chips/w83792d.c index d9c15178..a50124ad 100644 --- a/kernel/chips/w83792d.c +++ b/kernel/chips/w83792d.c @@ -604,8 +604,12 @@ static int w83792d_detect(struct i2c_adapter *adapter, int address, } else { val1 = w83792d_read_value(new_client, W83792D_REG_I2C_SUBADDR); - data->lm75[0].addr = 0x48 + (val1 & 0x03); - data->lm75[1].addr = 0x4c + ((val1 >> 4) & 0x03); + data->lm75[0].addr = 0x48 + (val1 & 0x07); + data->lm75[1].addr = 0x48 + ((val1 >> 4) & 0x07); + if (data->lm75[0].addr == data->lm75[1].addr) + printk(KERN_WARNING "w83792d: Subclients have the same " + "address (0x%02x)! Use force_subclients.\n", + data->lm75[0].addr); } client_name = "W83792D subclient";