Skip to contentSkip to conversation

drivers/iio/gyro/mpu3050-core.c: This patch fix the following checkpatch warning.

PATCH Superseded Mohan Kumar 2 participants 2 messages Apr 12, 2019 – Apr 14, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/iio/gyro/mpu3050-core.c: This patch fix the following checkpatch warning.

As per Documentation/timers/timers-howto.txt Msleep < 20ms can sleep for up to 20ms. so use usleep_range.

---
 drivers/iio/gyro/mpu3050-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/gyro/mpu3050-core.c +1 -1
index 85b7ac4..0a40616 100644
@@ -865,7 +865,7 @@ static int mpu3050_power_up(struct mpu3050 *mpu3050)
 		dev_err(mpu3050->dev, "error setting power mode\n");
 		return ret;
 	}
-	msleep(10);
+	usleep_range(10000, 20000);
 
 	return 0;
 }
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 4 lines · On Fri, 12 Apr 2019 13:09:23 +0300 Mohan Kumar <[email protected]> wrote:

As per Documentation/timers/timers-howto.txt Msleep < 20ms can sleep for up to 20ms. so use usleep_range.

Please resend, ccing the [email protected] mailing list.

Thanks,

Jonathan

Quoted 17 lines
---
 drivers/iio/gyro/mpu3050-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iio/gyro/mpu3050-core.c +1 -1
index 85b7ac4..0a40616 100644
@@ -865,7 +865,7 @@ static int mpu3050_power_up(struct mpu3050 *mpu3050)
 		dev_err(mpu3050->dev, "error setting power mode\n");
 		return ret;
 	}
-	msleep(10);
+	usleep_range(10000, 20000);
 
 	return 0;
 }