[PATCH] fbdev: riva warning fix
authorAndrew Morton <akpm@osdl.org>
Wed, 4 Oct 2006 09:16:24 +0000 (02:16 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 4 Oct 2006 14:55:24 +0000 (07:55 -0700)
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: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/riva/fbdev.c

index b120896c8ab455eb0e99d9454199a9847567e20f..a433cc78ef90b1d7c11639c52c838ae56457f504 100644 (file)
@@ -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;
                        }