Fix this warning when DEBUG_PREEMPT is selected:
BUG: using smp_processor_id() in preemptible [
00000000] code: cfinteractive/72
caller is rockchip_i2c_doxfer+0x58/0x3cc
*/
int msleep_time = 400 * 1000 / i2c->scl_rate; // ms
int can_sleep = !(in_atomic() || irqs_disabled());
- int cpu = smp_processor_id();
if (i2c->suspended) {
dev_err(i2c->dev, "i2c is suspended\n");
}
timeout = ret;
} else {
+ int cpu = raw_smp_processor_id();
int tmo = I2C_WAIT_TIMEOUT * USEC_PER_MSEC;
while (tmo-- && i2c->is_busy != 0) {
spin_unlock_irqrestore(&i2c->lock, flags);