Revert to Fedora kernel-2.6.17-1.2187_FC5 patched with vs2.0.2.1; there are too many...
[linux-2.6.git] / drivers / sbus / char / flash.c
index 40a400e..2beb3dd 100644 (file)
@@ -24,7 +24,7 @@
 #include <asm/ebus.h>
 #include <asm/upa.h>
 
-static spinlock_t flash_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(flash_lock);
 static struct {
        unsigned long read_base;        /* Physical read address */
        unsigned long write_base;       /* Physical write address */
@@ -71,11 +71,10 @@ flash_mmap(struct file *file, struct vm_area_struct *vma)
        if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size)
                size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT));
 
-       pgprot_val(vma->vm_page_prot) &= ~(_PAGE_CACHE);
-       pgprot_val(vma->vm_page_prot) |= _PAGE_E;
        vma->vm_flags |= (VM_SHM | VM_LOCKED);
+       vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
 
-       if (remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot))
+       if (io_remap_pfn_range(vma, vma->vm_start, addr, size, vma->vm_page_prot))
                return -EAGAIN;
                
        return 0;