try fix
This commit is contained in:
parent
b5737cb31e
commit
9e070b35d1
1 changed files with 10 additions and 13 deletions
23
code/lkm.c
23
code/lkm.c
|
@ -12,9 +12,6 @@ int lkm_open(struct inode *, struct file *);
|
||||||
int lkm_release(struct inode *, struct file *);
|
int lkm_release(struct inode *, struct file *);
|
||||||
long lkm_ioctl(struct file *, unsigned int, long unsigend int);
|
long lkm_ioctl(struct file *, unsigned int, long unsigend int);
|
||||||
|
|
||||||
module_init(lkm_init);
|
|
||||||
module_exit(lkm_exit);
|
|
||||||
|
|
||||||
static struct file_operations lkm_fops = {
|
static struct file_operations lkm_fops = {
|
||||||
.owner = "",
|
.owner = "",
|
||||||
.open = lkm_open,
|
.open = lkm_open,
|
||||||
|
@ -22,11 +19,6 @@ static struct file_operations lkm_fops = {
|
||||||
.unlocked_ioctl = lkm_ioctl,
|
.unlocked_ioctl = lkm_ioctl,
|
||||||
};
|
};
|
||||||
|
|
||||||
MODULE_AUTHOR("Mira Chacku Purakal");
|
|
||||||
MODULE_DESCRIPTION("Generic Module");
|
|
||||||
MODULE_VERSION("0.1");
|
|
||||||
MODULE_LICENSE("GPL");
|
|
||||||
|
|
||||||
static int
|
static int
|
||||||
lkm_init(void)
|
lkm_init(void)
|
||||||
{
|
{
|
||||||
|
@ -60,8 +52,13 @@ lkm_release(struct inode *inode, struct file *fp)
|
||||||
printk(KERN_INFO "lkm: release: start")
|
printk(KERN_INFO "lkm: release: start")
|
||||||
}
|
}
|
||||||
|
|
||||||
long
|
long lkm_ioctl(struct file *fp, unsigned int num,
|
||||||
lkm_ioctl(struct file *fp, unsigned int num, long unsigned int param)
|
long unsigned int param) { printk(KERN_INFO "lkm: release: start") }
|
||||||
{
|
|
||||||
printk(KERN_INFO "lkm: release: start")
|
MODULE_AUTHOR("Mira Chacku Purakal");
|
||||||
}
|
MODULE_DESCRIPTION("Generic Module");
|
||||||
|
MODULE_VERSION("0.1");
|
||||||
|
MODULE_LICENSE("GPL");
|
||||||
|
|
||||||
|
module_init(lkm_init);
|
||||||
|
module_exit(lkm_exit);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue