Closed MADMechaniculus closed 10 months ago
Yeah..
Change:
class_create(THIS_MODULE, XDMA_NODE_NAME);
To:
class_create(XDMA_NODE_NAME);
And here is complete guide for repaire the issue:
cdev_write_iter
and cdev_read_iter
, need to change io->iov
to io->__iov
;class_create(THIS_MODULE, XDMA_NODE_NAME)
to class_create(XDMA_NODE_NAME)
;vma->vm_flags
to vm_area_struct *
. For example, you could write a function to write a flag into vm_flags
field of vma (now is const):// Source cpied from another devforum
void vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags) {
vma->vm_flags |= flags;
}
Usage:
// ... bridge mmap function body
vm_flags_set(vma, VMEM_FLAGS)
// ...
With this changes, driver completly builds, again :)
The build of kernel module results in the following errors due to changing the function prototype
class_create
:Kernel changes insides too quickly.