staging: fbtft: fb_agm1264k-fl.c: Replaced udelay by usleep_range
Subsystems (3)
PATCH 1/1 staging: fbtft: fb_agm1264k-fl.c: Replaced udelay by usleep_range
This patch replace udelay with usleep_range according to the Documentation/timers/timers-howto.txt . The usleep_range have a range that is >= of udelay.
--- drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/fbtft/fb_agm1264k-fl.c +1 -1
@@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)dev_dbg (par->info->device,"%s()\n" , __func__);gpiod_set_value (par->gpio.reset,0 ); -udelay (20 ); +usleep_range (20 ,25 );gpiod_set_value (par->gpio.reset,1 );mdelay (120 ); }
Signature · 1 line
2.17.1
Greg KH
maintainerQuoted 14 lines · Fabrizio Benedetti
This patch replace udelay with
usleep_rangeaccording to theDocumentation/timers/timers-howto.txt. Theusleep_rangehave a range that is >= of udelay.Signed-off-by Fabrizio Benedetti <[email protected]>--- drivers/staging/fbtft/fb_agm1264k-fl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/staging/fbtft/fb_agm1264k-fl.c +0
-0
drivers/staging/fbtft/fb_agm1264k-fl.c static void reset(struct fbtft_par *par) · line 88
Quoted 5 lines
drivers/staging/fbtft/fb_agm1264k-fl.c +1
-1@@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)dev_dbg (par->info->device,"%s()\n" , __func__);gpiod_set_value (par->gpio.reset,0 ); -udelay (20 ); +usleep_range (20 ,25 );
And are you sure that 25 is ok here?
Unless you have the hardware, don't make up random numbers for things like delays :)
Also, be sure you use the correct mailing lists, why did you ignore the output of scripts/get_maintainer.pl for this patch?
thanks,
greg k-h
Quoted 4 lines · Fabrizio Benedetti
This patch replace udelay with
usleep_rangeaccording to theDocumentation/timers/timers-howto.txt. Theusleep_rangehave a range that is >= of udelay.
has
Also all functions we refer to as func(). Note parentheses.
...
drivers/staging/fbtft/fb_agm1264k-fl.c static void reset(struct fbtft_par *par) · line 91
Quoted 9 lines
drivers/staging/fbtft/fb_agm1264k-fl.c +1
-1@@ -85,7 +85,7 @@ static void reset(struct fbtft_par *par)dev_dbg (par->info->device,"%s()\n" , __func__);gpiod_set_value (par->gpio.reset,0 ); -udelay (20 ); +usleep_range (20 ,25 );gpiod_set_value (par->gpio.reset,1 );mdelay (120 ); }
It's funny you left mdelay and on top of this all of the above makes sense if you also switch to gpiod_set_value_can_sleep().
This will also require your analysis of the context (atomic / non-atomic) in the commit message.
Signature · 2 lines
With Best Regards, Andy Shevchenko