mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
staging: fbtft: fb_tinylcd: replace udelay() with fsleep()
fsleep() is the preferred modern API for flexible sleeping as it automatically selects the best sleep mechanism based on the duration. Replace udelay() with fsleep() to improve power efficiency. init_display() is a driver initialization callback which runs in sleeping context, so fsleep() is safe to use here. Signed-off-by: Tomasz Unger <tomasz.unger@yahoo.pl> Acked-by: Andy Shevchenko <andriy.shevchenko@intel.com> Link: https://patch.msgid.link/20260219142942.74087-1-tomasz.unger@yahoo.pl Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b8077a5bec
commit
6edec96a66
@@ -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);
|
||||
fsleep(250);
|
||||
write_reg(par, MIPI_DCS_SET_DISPLAY_ON);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user