summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kohtala <marko.kohtala@okoko.fi>2019-06-18 10:41:06 +0300
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2019-07-23 17:17:37 +0200
commited1dc7d565788eb2b378360c79d7060ad2d41770 (patch)
treeaf2b52cadcb3fcd267b02ea795dad16b80cbf5c1
parent8cbff03bb090d537063c935058ab6fceb8ee30f5 (diff)
video: ssd1307fb: Use screen_buffer instead of screen_base
sparse reported incorrect type due to different address spaces. The screen_base is __iomem, but the memory is not from a device so we can use screen_buffer instead and avoid some type casts. Signed-off-by: Marko Kohtala <marko.kohtala@okoko.fi> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Rob Herring <robh+dt@kernel.org> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Cc: Michal Vokáč <michal.vokac@ysoft.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/20190618074111.9309-2-marko.kohtala@okoko.fi
-rw-r--r--drivers/video/fbdev/ssd1307fb.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/video/fbdev/ssd1307fb.c b/drivers/video/fbdev/ssd1307fb.c
index b674948e3bb8..0597f24bd5be 100644
--- a/drivers/video/fbdev/ssd1307fb.c
+++ b/drivers/video/fbdev/ssd1307fb.c
@@ -149,7 +149,7 @@ static inline int ssd1307fb_write_cmd(struct i2c_client *client, u8 cmd)
static void ssd1307fb_update_display(struct ssd1307fb_par *par)
{
struct ssd1307fb_array *array;
- u8 *vmem = par->info->screen_base;
+ u8 *vmem = par->info->screen_buffer;
int i, j, k;
array = ssd1307fb_alloc_array(par->width * par->height / 8,
@@ -212,7 +212,7 @@ static ssize_t ssd1307fb_write(struct fb_info *info, const char __user *buf,
struct ssd1307fb_par *par = info->par;
unsigned long total_size;
unsigned long p = *ppos;
- u8 __iomem *dst;
+ void *dst;
total_size = info->fix.smem_len;
@@ -225,7 +225,7 @@ static ssize_t ssd1307fb_write(struct fb_info *info, const char __user *buf,
if (!count)
return -EINVAL;
- dst = (void __force *) (info->screen_base + p);
+ dst = info->screen_buffer + p;
if (copy_from_user(dst, buf, count))
return -EFAULT;
@@ -546,7 +546,7 @@ static int ssd1307fb_probe(struct i2c_client *client,
struct fb_deferred_io *ssd1307fb_defio;
u32 vmem_size;
struct ssd1307fb_par *par;
- u8 *vmem;
+ void *vmem;
int ret;
if (!node) {
@@ -654,7 +654,7 @@ static int ssd1307fb_probe(struct i2c_client *client,
info->var.blue.length = 1;
info->var.blue.offset = 0;
- info->screen_base = (u8 __force __iomem *)vmem;
+ info->screen_buffer = vmem;
info->fix.smem_start = __pa(vmem);
info->fix.smem_len = vmem_size;