lkml.org 
[lkml]   [2020]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] staging: fbtft: fb_watterott: fix usleep_range is preferred over udelay
Date
Fix the checkpath.pl issue on fb_watterott.c. write_vmem and
write_vmem_8bit functions are within non-atomic context and can
safely use usleep_range.
see Documentation/timers/timers-howto.txt

Signed-off-by: Hassan Shahbazi <hassan@ninchat.com>
---
drivers/staging/fbtft/fb_watterott.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/fbtft/fb_watterott.c b/drivers/staging/fbtft/fb_watterott.c
index 76b25df376b8..afcc86a17995 100644
--- a/drivers/staging/fbtft/fb_watterott.c
+++ b/drivers/staging/fbtft/fb_watterott.c
@@ -84,7 +84,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, 310);
}

return 0;
@@ -124,7 +124,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, 710);
}

return 0;
--
2.25.1
\
 
 \ /
  Last update: 2020-11-01 01:20    [W:0.064 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site