i2c: algo-bit: fix debug code
Replace jiffies from kernel code with get_time_ns. The flags variable used in the readbytes debug output does not exist. Signed-off-by: Jan Luebbe <jluebbe@debian.org>
This commit is contained in:
parent
af26985016
commit
8127dfdaa1
|
@ -106,9 +106,10 @@ static int sclhi(struct i2c_algo_bit_data *adap)
|
|||
}
|
||||
}
|
||||
#ifdef DEBUG
|
||||
if (jiffies != start && i2c_debug >= 3)
|
||||
pr_debug("i2c-algo-bit: needed %ld jiffies for SCL to go "
|
||||
"high\n", jiffies - start);
|
||||
if ((get_time_ns() - start) < 10000)
|
||||
pr_debug("i2c-algo-bit: needed %u usecs for SCL to go "
|
||||
"high\n", (unsigned int)(get_time_ns() - start) /
|
||||
1000);
|
||||
#endif
|
||||
|
||||
done:
|
||||
|
@ -426,10 +427,7 @@ static int readbytes(struct i2c_adapter *i2c_adap, struct i2c_msg *msg)
|
|||
count--;
|
||||
|
||||
bit_dbg(2, &i2c_adap->dev, "readbytes: 0x%02x %s\n",
|
||||
inval,
|
||||
(flags & I2C_M_NO_RD_ACK)
|
||||
? "(no ack/nak)"
|
||||
: (count ? "A" : "NA"));
|
||||
inval, count ? "A" : "NA");
|
||||
|
||||
inval = acknak(i2c_adap, count);
|
||||
if (inval < 0)
|
||||
|
|
Loading…
Reference in New Issue