Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=89cf7ccc936db979e5e9d9ce49437ef859cdd889
Commit:     89cf7ccc936db979e5e9d9ce49437ef859cdd889
Parent:     9eeee244142562cba4f9fbc93962acf6a61847b5
Author:     Jan Beulich <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 2 14:50:14 2007 +0100
Committer:  Dave Jones <[EMAIL PROTECTED]>
CommitDate: Thu Apr 26 14:22:51 2007 -0400

    [AGPGART] Intel-agp adjustments
    
    Fix a call to __free_page where __free_pages(, 2) was meant, and do proper
    error path handling. Also remove a redundant conditional.
    
    Signed-off-by: Jan Beulich <[EMAIL PROTECTED]>
    Signed-off-by: Dave Jones <[EMAIL PROTECTED]>
---
 drivers/char/agp/intel-agp.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 55392a4..9c69f2e 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -186,8 +186,9 @@ static void *i8xx_alloc_pages(void)
                return NULL;
 
        if (change_page_attr(page, 4, PAGE_KERNEL_NOCACHE) < 0) {
+               change_page_attr(page, 4, PAGE_KERNEL);
                global_flush_tlb();
-               __free_page(page);
+               __free_pages(page, 2);
                return NULL;
        }
        global_flush_tlb();
@@ -209,7 +210,7 @@ static void i8xx_destroy_pages(void *addr)
        global_flush_tlb();
        put_page(page);
        unlock_page(page);
-       free_pages((unsigned long)addr, 2);
+       __free_pages(page, 2);
        atomic_dec(&agp_bridge->current_memory_agp);
 }
 
@@ -315,9 +316,6 @@ static struct agp_memory *alloc_agpphysmem_i8xx(size_t 
pg_count, int type)
        struct agp_memory *new;
        void *addr;
 
-       if (pg_count != 1 && pg_count != 4)
-               return NULL;
-
        switch (pg_count) {
        case 1: addr = agp_bridge->driver->agp_alloc_page(agp_bridge);
                global_flush_tlb();
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to