LDD 5 How to write char dev driver with file_operations - limingth/LASO GitHub Wiki
#include <linux/module.h>
#include <asm/io.h>
--
ioremap()
module_init()
module_exit()
#include <linux/fs.h>
--
file_operations led_fops = {
.owner = THIS_MODULE,
.open =
.release =
.write =
.read =
.ioctl =
}
MAJOR()
MINOR()
register_chrdev()
unregister_chrdev()
copy_from_user()
copy_to_user()
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
---