Changes some udelay(n) for n >= 10 to usleep_range(n, n+x) as recommended by checkpatch.pl. Signed-off-by: Leonardo Brás <leobras.c@xxxxxxxxx> --- drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +- drivers/staging/fbtft/fb_ra8875.c | 4 ++-- drivers/staging/fbtft/fb_tinylcd.c | 2 +- drivers/staging/fbtft/fb_upd161704.c | 19 +++++++++---------- drivers/staging/fbtft/fb_watterott.c | 4 ++-- 5 files changed, 15 insertions(+), 16 deletions(-) diff --git a/drivers/staging/fbtft/fb_agm1264k-fl.c b/drivers/staging/fbtft/fb_agm1264k-fl.c index f6f30f5bf15a..7a24bde7ca8d 100644 --- a/drivers/staging/fbtft/fb_agm1264k-fl.c +++ b/drivers/staging/fbtft/fb_agm1264k-fl.c @@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par) dev_dbg(par->info->device, "%s()\n", __func__); gpio_set_value(par->gpio.reset, 0); - udelay(20); + usleep_range(20, 25); gpio_set_value(par->gpio.reset, 1); mdelay(120); } diff --git a/drivers/staging/fbtft/fb_ra8875.c b/drivers/staging/fbtft/fb_ra8875.c index 5d3b76ca74d8..e2a62677b65b 100644 --- a/drivers/staging/fbtft/fb_ra8875.c +++ b/drivers/staging/fbtft/fb_ra8875.c @@ -217,7 +217,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...) } len--; - udelay(100); + usleep_range(100, 101); if (len) { buf = (u8 *)par->buf; @@ -238,7 +238,7 @@ static void write_reg8_bus8(struct fbtft_par *par, int len, ...) /* restore user spi-speed */ par->fbtftops.write = fbtft_write_spi; - udelay(100); + usleep_range(100, 101); } static int write_vmem16_bus8(struct fbtft_par *par, size_t offset, size_t len) diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c index e463b0ddf16d..3b2af1becca8 100644 --- a/drivers/staging/fbtft/fb_tinylcd.c +++ b/drivers/staging/fbtft/fb_tinylcd.c @@ -41,7 +41,7 @@ static int init_display(struct fbtft_par *par) 0x00, 0x35, 0x33, 0x00, 0x00, 0x00); write_reg(par, MIPI_DCS_SET_PIXEL_FORMAT, 0x55); write_reg(par, MIPI_DCS_EXIT_SLEEP_MODE); - udelay(250); + usleep_range(250, 251); write_reg(par, MIPI_DCS_SET_DISPLAY_ON); return 0; diff --git a/drivers/staging/fbtft/fb_upd161704.c b/drivers/staging/fbtft/fb_upd161704.c index acc425fdf34e..10794f81b66e 100644 --- a/drivers/staging/fbtft/fb_upd161704.c +++ b/drivers/staging/fbtft/fb_upd161704.c @@ -36,27 +36,26 @@ static int init_display(struct fbtft_par *par) /* oscillator start */ write_reg(par, 0x003A, 0x0001); /*Oscillator 0: stop, 1: operation */ - udelay(100); - + usleep_range(100, 101); /* y-setting */ write_reg(par, 0x0024, 0x007B); /* amplitude setting */ - udelay(10); + usleep_range(10, 11); write_reg(par, 0x0025, 0x003B); /* amplitude setting */ write_reg(par, 0x0026, 0x0034); /* amplitude setting */ - udelay(10); + usleep_range(10, 11); write_reg(par, 0x0027, 0x0004); /* amplitude setting */ write_reg(par, 0x0052, 0x0025); /* circuit setting 1 */ - udelay(10); + usleep_range(10, 11); write_reg(par, 0x0053, 0x0033); /* circuit setting 2 */ write_reg(par, 0x0061, 0x001C); /* adjustment V10 positive polarity */ - udelay(10); + usleep_range(10, 11); write_reg(par, 0x0062, 0x002C); /* adjustment V9 negative polarity */ write_reg(par, 0x0063, 0x0022); /* adjustment V34 positive polarity */ - udelay(10); + usleep_range(10, 11); write_reg(par, 0x0064, 0x0027); /* adjustment V31 negative polarity */ - udelay(10); + usleep_range(10, 11); write_reg(par, 0x0065, 0x0014); /* adjustment V61 negative polarity */ - udelay(10); + usleep_range(10, 11); write_reg(par, 0x0066, 0x0010); /* adjustment V61 negative polarity */ /* Basical clock for 1 line (BASECOUNT[7:0]) number specified */ @@ -64,7 +63,7 @@ static int init_display(struct fbtft_par *par) /* Power supply setting */ write_reg(par, 0x0019, 0x0000); /* DC/DC output setting */ - udelay(200); + usleep_range(200, 201); write_reg(par, 0x001A, 0x1000); /* DC/DC frequency setting */ write_reg(par, 0x001B, 0x0023); /* DC/DC rising setting */ write_reg(par, 0x001C, 0x0C01); /* Regulator voltage setting */ diff --git a/drivers/staging/fbtft/fb_watterott.c b/drivers/staging/fbtft/fb_watterott.c index bfd1527f20f7..9ad4307a50c8 100644 --- a/drivers/staging/fbtft/fb_watterott.c +++ b/drivers/staging/fbtft/fb_watterott.c @@ -83,7 +83,7 @@ static int write_vmem(struct fbtft_par *par, size_t offset, size_t len) par->txbuf.buf, 10 + par->info->fix.line_length); if (ret < 0) return ret; - udelay(300); + usleep_range(300, 301); } return 0; @@ -122,7 +122,7 @@ static int write_vmem_8bit(struct fbtft_par *par, size_t offset, size_t len) par->txbuf.buf, 10 + par->info->var.xres); if (ret < 0) return ret; - udelay(700); + usleep_range(700, 701); } return 0; -- 2.18.0 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel