This commit is contained in:
Ciro Santilli
2017-07-30 13:34:51 +01:00
parent 46bf3f700e
commit 7d6449d47b
2 changed files with 42 additions and 11 deletions

View File

@@ -74,6 +74,7 @@ static int open(struct inode *inode, struct file *filp)
pr_info("open\n");
info = kmalloc(sizeof(struct mmap_info), GFP_KERNEL);
pr_info("virt_to_phys = 0x%llx\n", (unsigned long long)virt_to_phys((void *)info->data));
info->data = (char *)get_zeroed_page(GFP_KERNEL);
memcpy(info->data, "asdf", BUFFER_SIZE);
filp->private_data = info;