第一个驱动hello_drv的详解
一、构建file_operations
static struct file_operations hello_drv = {在这里插入代码片
.owner = THIS_MODULE,
.open = hello_drv_open,
.release = hello_drv_close,
.read = hello_drv_read,
.write = hello_drv_write,
};
*宏THIS_MODULE,它的定义如下是
*define THIS_MODULE (&a
原创
2020-05-21 21:36:29 ·
656 阅读 ·
0 评论