]> git.hungrycats.org Git - linux/commitdiff
[PATCH] i810/i830 AGP update
authorBjorn Helgaas <bjorn_helgaas@hp.com>
Mon, 6 Jan 2003 07:14:59 +0000 (23:14 -0800)
committerPaul Mackerras <paulus@samba.org>
Mon, 6 Jan 2003 07:14:59 +0000 (23:14 -0800)
Here are the i810 and i830 fixes.  I don't have either of these, so I
can't test them, but they're pretty straightforward.

drivers/char/agp/intel-agp.c

index c66119cfc2af091bf1d28693d674b8a4f68bf91c..7fae8df7e7229cc04f47fdc8fb2e97579159a384 100644 (file)
@@ -220,11 +220,11 @@ static agp_memory *intel_i810_alloc_by_type(size_t pg_count, int type)
                        agp_free_memory(new);
                        return NULL;
                }
-               new->memory[0] = virt_to_phys((void *) new->memory[0]);
+               new->memory[0] = virt_to_phys(addr);
                new->page_count = 1;
                new->num_scratch_pages = 1;
                new->type = AGP_PHYS_MEMORY;
-               new->physical = virt_to_phys((void *) new->memory[0]);
+               new->physical = new->memory[0];
                return new;
        }
        return NULL;
@@ -515,11 +515,11 @@ static agp_memory *intel_i830_alloc_by_type(size_t pg_count,int type)
                        return(NULL);
                }
 
-               nw->memory[0] = virt_to_phys((void *) nw->memory[0]);
+               nw->memory[0] = virt_to_phys(addr);
                nw->page_count = 1;
                nw->num_scratch_pages = 1;
                nw->type = AGP_PHYS_MEMORY;
-               nw->physical = virt_to_phys(addr);
+               nw->physical = nw->memory[0];
                return(nw);
        }