Merge tag 'drm-next-2021-04-28' of git://anongit.freedesktop.org/drm/drm
[linux-2.6-microblaze.git] / drivers / video / fbdev / amba-clcd.c
index 33595cc..9ec969e 100644 (file)
 /* This is limited to 16 characters when displayed by X startup */
 static const char *clcd_name = "CLCD FB";
 
-/*
- * Unfortunately, the enable/disable functions may be called either from
- * process or IRQ context, and we _need_ to delay.  This is _not_ good.
- */
-static inline void clcdfb_sleep(unsigned int ms)
-{
-       if (in_atomic()) {
-               mdelay(ms);
-       } else {
-               msleep(ms);
-       }
-}
-
 static inline void clcdfb_set_start(struct clcd_fb *fb)
 {
        unsigned long ustart = fb->fb.fix.smem_start;
@@ -77,7 +64,7 @@ static void clcdfb_disable(struct clcd_fb *fb)
                val &= ~CNTL_LCDPWR;
                writel(val, fb->regs + fb->off_cntl);
 
-               clcdfb_sleep(20);
+               msleep(20);
        }
        if (val & CNTL_LCDEN) {
                val &= ~CNTL_LCDEN;
@@ -109,7 +96,7 @@ static void clcdfb_enable(struct clcd_fb *fb, u32 cntl)
        cntl |= CNTL_LCDEN;
        writel(cntl, fb->regs + fb->off_cntl);
 
-       clcdfb_sleep(20);
+       msleep(20);
 
        /*
         * and now apply power.