]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/mem.c
PCI: use config space encoding in pci_get_interrupt_pin()
[linux-2.6-omap-h63xx.git] / drivers / char / mem.c
index 070e22e8ea9efb43a180149caa5a47d70faf471f..3586b3b3df3f50b1bc1c87669edc6ac54ef8ac67 100644 (file)
@@ -80,7 +80,7 @@ static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)
 }
 #endif
 
-#ifdef CONFIG_NONPROMISC_DEVMEM
+#ifdef CONFIG_STRICT_DEVMEM
 static inline int range_is_allowed(unsigned long pfn, unsigned long size)
 {
        u64 from = ((u64)pfn) << PAGE_SHIFT;
@@ -327,7 +327,10 @@ static void mmap_mem_close(struct vm_area_struct *vma)
 
 static struct vm_operations_struct mmap_mem_ops = {
        .open  = mmap_mem_open,
-       .close = mmap_mem_close
+       .close = mmap_mem_close,
+#ifdef CONFIG_HAVE_IOREMAP_PROT
+       .access = generic_access_phys
+#endif
 };
 
 static int mmap_mem(struct file * file, struct vm_area_struct * vma)
@@ -422,9 +425,6 @@ static ssize_t read_oldmem(struct file *file, char __user *buf,
 }
 #endif
 
-extern long vread(char *buf, char *addr, unsigned long count);
-extern long vwrite(char *buf, char *addr, unsigned long count);
-
 #ifdef CONFIG_DEVKMEM
 /*
  * This function reads the *virtual* memory as seen by the kernel.
@@ -990,7 +990,7 @@ static int __init chr_dev_init(void)
        mem_class = class_create(THIS_MODULE, "mem");
        for (i = 0; i < ARRAY_SIZE(devlist); i++)
                device_create(mem_class, NULL,
-                             MKDEV(MEM_MAJOR, devlist[i].minor),
+                             MKDEV(MEM_MAJOR, devlist[i].minor), NULL,
                              devlist[i].name);
 
        return 0;