[PATCH] staging: fbtft: force cast to non-__iomem pointer
From: Garret Kelly
Date: Thu Apr 16 2015 - 13:29:37 EST
fbtft uses fb_info's screen_base field to store a non-__iomem
allocation. Cast away the __iomem qualifier when freeing the pointer to
suppress the sparse warning.
Fixes the following sparse warnings:
drivers/staging/fbtft/fbtft-core.c:918:19: warning: incorrect type in argument 1 (different address spaces)
drivers/staging/fbtft/fbtft-core.c:918:19: expected void const *addr
drivers/staging/fbtft/fbtft-core.c:918:19: got char [noderef] <asn:2>*screen_base
Signed-off-by: Garret Kelly <gdk@xxxxxxxxxx>
---
drivers/staging/fbtft/fbtft-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/fbtft/fbtft-core.c b/drivers/staging/fbtft/fbtft-core.c
index 37dcf7e..1196dda 100644
--- a/drivers/staging/fbtft/fbtft-core.c
+++ b/drivers/staging/fbtft/fbtft-core.c
@@ -925,7 +925,7 @@ EXPORT_SYMBOL(fbtft_framebuffer_alloc);
void fbtft_framebuffer_release(struct fb_info *info)
{
fb_deferred_io_cleanup(info);
- vfree(info->screen_base);
+ vfree((void __force *)info->screen_base);
framebuffer_release(info);
}
EXPORT_SYMBOL(fbtft_framebuffer_release);
--
2.0.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/