Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: magnetometer: bmc150_magn: replace msleep with fsleep

Replace msleep(5) with fsleep(5 * USEC_PER_MSEC) to allow the kernel
to select the most appropriate delay mechanism based on duration.
Using USEC_PER_MSEC makes the unit conversion explicit.

Signed-off-by: Neel Bullywon <neelb2403@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Neel Bullywon and committed by
Jonathan Cameron
d1fa7b31 e3310a32

+1 -1
+1 -1
drivers/iio/magnetometer/bmc150_magn.c
··· 695 695 * 3ms power-on time according to datasheet, let's better 696 696 * be safe than sorry and set this delay to 5ms. 697 697 */ 698 - msleep(5); 698 + fsleep(5 * USEC_PER_MSEC); 699 699 700 700 ret = bmc150_magn_set_power_mode(data, BMC150_MAGN_POWER_MODE_SUSPEND, 701 701 false);