return 0;
}
-#ifdef CONFIG_DEVKMEM
static int mmap_kmem(struct file *file, struct vm_area_struct *vma)
{
unsigned long pfn;
vma->vm_pgoff = pfn;
return mmap_mem(file, vma);
}
-#endif
-#ifdef CONFIG_DEVKMEM
/*
* This function reads the *virtual* memory as seen by the kernel.
*/
*ppos = p;
return virtr + wrote ? : err;
}
-#endif
#ifdef CONFIG_DEVPORT
static ssize_t read_port(struct file *file, char __user *buf,
.get_unmapped_area = get_unmapped_area_mem,
};
-#ifdef CONFIG_DEVKMEM
-static const struct file_operations kmem_fops = {
+static const struct file_operations __maybe_unused kmem_fops = {
.llseek = memory_lseek,
.read = read_kmem,
.write = write_kmem,
.open = open_kmem,
.get_unmapped_area = get_unmapped_area_mem,
};
-#endif
static const struct file_operations null_fops = {
.llseek = null_lseek,