diff options
author | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2020-01-16 15:53:20 +0100 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2020-03-02 16:31:51 +0100 |
commit | df3381071ca0ee54b1a3e934cf7ef2fcf6904369 (patch) | |
tree | b2e5bc289b98e213c24c6128a7a275969837d2d5 /drivers/video/fbdev | |
parent | 3d3287e609877aa549b1cbb41eafaf73c3742a0b (diff) |
video: fbdev: w100fb: fix sparse warnings
* Add missing __iomem annotations where needed.
* Make w100fb_probe() static.
* Return NULL pointer (instead of using plain integer) in
w100_get_xtal_tabl().
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/d438108a-e569-a14a-a9b1-3fefd88fcadc@samsung.com
Diffstat (limited to 'drivers/video/fbdev')
-rw-r--r-- | drivers/video/fbdev/w100fb.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/video/fbdev/w100fb.c b/drivers/video/fbdev/w100fb.c index ad26cbffbc6f..2d6e2738b792 100644 --- a/drivers/video/fbdev/w100fb.c +++ b/drivers/video/fbdev/w100fb.c @@ -61,9 +61,9 @@ struct w100_pll_info *w100_get_xtal_table(unsigned int freq); #define BITS_PER_PIXEL 16 /* Remapped addresses for base cfg, memmapped regs and the frame buffer itself */ -static void *remapped_base; -static void *remapped_regs; -static void *remapped_fbuf; +static void __iomem *remapped_base; +static void __iomem *remapped_regs; +static void __iomem *remapped_fbuf; #define REMAPPED_FB_LEN 0x15ffff @@ -635,7 +635,7 @@ static int w100fb_resume(struct platform_device *dev) #endif -int w100fb_probe(struct platform_device *pdev) +static int w100fb_probe(struct platform_device *pdev) { int err = -EIO; struct w100fb_mach_info *inf; @@ -807,10 +807,11 @@ static int w100fb_remove(struct platform_device *pdev) static void w100_soft_reset(void) { - u16 val = readw((u16 *) remapped_base + cfgSTATUS); - writew(val | 0x08, (u16 *) remapped_base + cfgSTATUS); + u16 val = readw((u16 __iomem *)remapped_base + cfgSTATUS); + + writew(val | 0x08, (u16 __iomem *)remapped_base + cfgSTATUS); udelay(100); - writew(0x00, (u16 *) remapped_base + cfgSTATUS); + writew(0x00, (u16 __iomem *)remapped_base + cfgSTATUS); udelay(100); } @@ -1022,7 +1023,8 @@ struct w100_pll_info *w100_get_xtal_table(unsigned int freq) return pll_entry->pll_table; pll_entry++; } while (pll_entry->xtal_freq); - return 0; + + return NULL; } |