From: Tomasz Unger Date: Thu, 19 Feb 2026 14:29:42 +0000 (+0100) Subject: staging: fbtft: fb_tinylcd: replace udelay() with fsleep() X-Git-Tag: v7.1-rc1~81^2~126 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=6edec96a66cac874e39e19c7f69ea042f90d7155;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Andy Shevchenko Link: https://patch.msgid.link/20260219142942.74087-1-tomasz.unger@yahoo.pl Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/fbtft/fb_tinylcd.c b/drivers/staging/fbtft/fb_tinylcd.c index fc17e3c687fbb..afa8f1c740c56 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); + fsleep(250); write_reg(par, MIPI_DCS_SET_DISPLAY_ON); return 0;