i2c-pasemi: Fix NACK detection

Turns out we don't actually check the status to see if there was a
device out there to talk to, just if we had a timeout when doing so.

Add the proper check, so we don't falsly think there are devices
on the bus that are not there, etc.

Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Jean Delvare <khali@linux-fr.org>

authored by Olof Johansson and committed by Jean Delvare be8a1f7c ff23f3ea

+5
+5
drivers/i2c/busses/i2c-pasemi.c
··· 51 51 #define MRXFIFO_DATA_M 0x000000ff 52 52 53 53 #define SMSTA_XEN 0x08000000 54 + #define SMSTA_MTN 0x00200000 54 55 55 56 #define CTL_MRR 0x00000400 56 57 #define CTL_MTR 0x00000200 ··· 98 97 msleep(1); 99 98 status = reg_read(smbus, REG_SMSTA); 100 99 } 100 + 101 + /* Got NACK? */ 102 + if (status & SMSTA_MTN) 103 + return -ENXIO; 101 104 102 105 if (timeout < 0) { 103 106 dev_warn(&smbus->dev->dev, "Timeout, status 0x%08x\n", status);