video: fbdev: atmel_lcdfb: add COMPILE_TEST support
authorBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 7 Jun 2019 12:38:06 +0000 (14:38 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 7 Jun 2019 12:38:06 +0000 (14:38 +0200)
Add COMPILE_TEST support to atmel_lcdfb driver for better compile
testing coverage.

While at it fix improper use of UL (to silence build warnings on
x86_64).

Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/Kconfig
drivers/video/fbdev/atmel_lcdfb.c

index 61c173b0c906a7858f399dd9f5e266ce8bae9a82..0f10f39a3ea1ffd064d4a1590fdcf93821911a03 100644 (file)
@@ -855,7 +855,8 @@ config FB_S1D13XXX
 
 config FB_ATMEL
        tristate "AT91 LCD Controller support"
-       depends on FB && OF && HAVE_FB_ATMEL
+       depends on FB && OF && HAVE_CLK && HAS_IOMEM
+       depends on HAVE_FB_ATMEL || COMPILE_TEST
        select FB_BACKLIGHT
        select FB_CFB_FILLRECT
        select FB_CFB_COPYAREA
index e67dfd94bf1d51d7d093f6f01e136aa84ad6eda9..fb117ccbeab3ff529214ea7ecb6a12f887b82bb0 100644 (file)
@@ -673,7 +673,7 @@ static int atmel_lcdfb_set_par(struct fb_info *info)
        lcdc_writel(sinfo, ATMEL_LCDC_MVAL, 0);
 
        /* Disable all interrupts */
-       lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
+       lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
        /* Enable FIFO & DMA errors */
        lcdc_writel(sinfo, ATMEL_LCDC_IER, ATMEL_LCDC_UFLWI | ATMEL_LCDC_OWRI | ATMEL_LCDC_MERI);
 
@@ -1291,7 +1291,7 @@ static int atmel_lcdfb_suspend(struct platform_device *pdev, pm_message_t mesg)
         * We don't want to handle interrupts while the clock is
         * stopped. It may take forever.
         */
-       lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0UL);
+       lcdc_writel(sinfo, ATMEL_LCDC_IDR, ~0U);
 
        sinfo->saved_lcdcon = lcdc_readl(sinfo, ATMEL_LCDC_CONTRAST_CTR);
        lcdc_writel(sinfo, ATMEL_LCDC_CONTRAST_CTR, 0);