]> err.no Git - linux-2.6/blobdiff - drivers/video/fbmon.c
[PATCH] sata_via: convert to new EH, take #3
[linux-2.6] / drivers / video / fbmon.c
index 0ef75a9f84affb10277d283f1d3d4573f513f262..53beeb4a99981af1a2079201e7fc9c2f26fe27e4 100644 (file)
@@ -528,10 +528,9 @@ static struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize)
        unsigned char *block;
        int num = 0, i;
 
-       mode = kmalloc(50 * sizeof(struct fb_videomode), GFP_KERNEL);
+       mode = kzalloc(50 * sizeof(struct fb_videomode), GFP_KERNEL);
        if (mode == NULL)
                return NULL;
-       memset(mode, 0, 50 * sizeof(struct fb_videomode));
 
        if (edid == NULL || !edid_checksum(edid) || 
            !edid_check_header(edid)) {
@@ -1282,7 +1281,7 @@ int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info)
                -EINVAL : 0;
 }
 
-#if defined(__i386__)
+#if defined(CONFIG_FB_FIRMWARE_EDID) && defined(__i386__)
 #include <linux/pci.h>
 
 /*
@@ -1312,11 +1311,11 @@ const unsigned char *fb_firmware_edid(struct device *device)
 {
        return NULL;
 }
-#endif /* _i386_ */
+#endif
+EXPORT_SYMBOL(fb_firmware_edid);
 
 EXPORT_SYMBOL(fb_parse_edid);
 EXPORT_SYMBOL(fb_edid_to_monspecs);
-EXPORT_SYMBOL(fb_firmware_edid);
 EXPORT_SYMBOL(fb_get_mode);
 EXPORT_SYMBOL(fb_validate_mode);
 EXPORT_SYMBOL(fb_destroy_modedb);