提交 0271eb94 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[PATCH] fbdev: riva warning fix

drivers/video/riva/fbdev.c: In function `riva_get_EDID_OF':
drivers/video/riva/fbdev.c:1846: warning: assignment discards qualifiers from pointer target type

This code is being bad: copying a pointer to read-only OF data into a
non-const pointer.

Cc: Paul Mackerras <paulus@samba.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 237fead6
......@@ -1843,7 +1843,7 @@ static int __devinit riva_get_EDID_OF(struct fb_info *info, struct pci_dev *pd)
for (i = 0; propnames[i] != NULL; ++i) {
pedid = get_property(dp, propnames[i], NULL);
if (pedid != NULL) {
par->EDID = pedid;
par->EDID = (unsigned char *)pedid;
NVTRACE("LCD found.\n");
return 1;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册