[SPARC]: Fix serial console device detection.
[deliverable/linux.git] / drivers / video / aty / atyfb_base.c
index 2fbff63174333b08909c87d438ab0e1ac708efad..13990697b5c12a76e41cd31fdc37873bebcbc2d5 100644 (file)
@@ -541,7 +541,7 @@ static char ram_off[] __devinitdata = "OFF";
 #endif /* CONFIG_FB_ATY_CT */
 
 
-static u32 pseudo_palette[17];
+static u32 pseudo_palette[16];
 
 #ifdef CONFIG_FB_ATY_GX
 static char *aty_gx_ram[8] __devinitdata = {
@@ -2913,10 +2913,6 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev,
        int node, len, i, j, ret;
        u32 mem, chip_id;
 
-       /* Do not attach when we have a serial console. */
-       if (!con_is_present())
-               return -ENXIO;
-
        /*
         * Map memory-mapped registers.
         */
@@ -2937,12 +2933,11 @@ static int __devinit atyfb_setup_sparc(struct pci_dev *pdev,
                /* nothing */ ;
        j = i + 4;
 
-       par->mmap_map = kmalloc(j * sizeof(*par->mmap_map), GFP_ATOMIC);
+       par->mmap_map = kcalloc(j, sizeof(*par->mmap_map), GFP_ATOMIC);
        if (!par->mmap_map) {
                PRINTKE("atyfb_setup_sparc() can't alloc mmap_map\n");
                return -ENOMEM;
        }
-       memset(par->mmap_map, 0, j * sizeof(*par->mmap_map));
 
        for (i = 0, j = 2; i < 6 && pdev->resource[i].start; i++) {
                struct resource *rp = &pdev->resource[i];
This page took 0.024731 seconds and 5 git commands to generate.