diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-03-13 14:56:52 -0500 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2010-03-13 14:56:52 -0500 |
commit | 8e4b980c28c91cfe9d0ce0431bc0af56e146b49e (patch) | |
tree | 9f928943355ccb00d3f5b0d7cc2cb63f933fc5eb /drivers/i2c | |
parent | f635a1e74bd6001f06fe1df53d32daf2b28bf04b (diff) |
i2c-powermac: Be less verbose in the absence of real errors.
Be less verbose in the absence of real errors. We don't have to report
failed probes to the users, it's only confusing them.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Andrey Gusev <ronne@list.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: stable@kernel.org
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-powermac.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/drivers/i2c/busses/i2c-powermac.c b/drivers/i2c/busses/i2c-powermac.c index 1c440a70ec61..b289ec99eeba 100644 --- a/drivers/i2c/busses/i2c-powermac.c +++ b/drivers/i2c/busses/i2c-powermac.c | |||
@@ -122,9 +122,14 @@ static s32 i2c_powermac_smbus_xfer( struct i2c_adapter* adap, | |||
122 | 122 | ||
123 | rc = pmac_i2c_xfer(bus, addrdir, subsize, subaddr, buf, len); | 123 | rc = pmac_i2c_xfer(bus, addrdir, subsize, subaddr, buf, len); |
124 | if (rc) { | 124 | if (rc) { |
125 | dev_err(&adap->dev, | 125 | if (rc == -ENXIO) |
126 | "I2C transfer at 0x%02x failed, size %d, err %d\n", | 126 | dev_dbg(&adap->dev, |
127 | addrdir >> 1, size, rc); | 127 | "I2C transfer at 0x%02x failed, size %d, " |
128 | "err %d\n", addrdir >> 1, size, rc); | ||
129 | else | ||
130 | dev_err(&adap->dev, | ||
131 | "I2C transfer at 0x%02x failed, size %d, " | ||
132 | "err %d\n", addrdir >> 1, size, rc); | ||
128 | goto bail; | 133 | goto bail; |
129 | } | 134 | } |
130 | 135 | ||
@@ -175,10 +180,16 @@ static int i2c_powermac_master_xfer( struct i2c_adapter *adap, | |||
175 | goto bail; | 180 | goto bail; |
176 | } | 181 | } |
177 | rc = pmac_i2c_xfer(bus, addrdir, 0, 0, msgs->buf, msgs->len); | 182 | rc = pmac_i2c_xfer(bus, addrdir, 0, 0, msgs->buf, msgs->len); |
178 | if (rc < 0) | 183 | if (rc < 0) { |
179 | dev_err(&adap->dev, "I2C %s 0x%02x failed, err %d\n", | 184 | if (rc == -ENXIO) |
180 | addrdir & 1 ? "read from" : "write to", addrdir >> 1, | 185 | dev_dbg(&adap->dev, "I2C %s 0x%02x failed, err %d\n", |
181 | rc); | 186 | addrdir & 1 ? "read from" : "write to", |
187 | addrdir >> 1, rc); | ||
188 | else | ||
189 | dev_err(&adap->dev, "I2C %s 0x%02x failed, err %d\n", | ||
190 | addrdir & 1 ? "read from" : "write to", | ||
191 | addrdir >> 1, rc); | ||
192 | } | ||
182 | bail: | 193 | bail: |
183 | pmac_i2c_close(bus); | 194 | pmac_i2c_close(bus); |
184 | return rc < 0 ? rc : 1; | 195 | return rc < 0 ? rc : 1; |