沙海草 发表于 2014-04-05 19:20

为什么安装驱动时没有打印信息呢?高手请给指点吧

#include <linux/fs.h>

#include <linux/module.h>

#include <linux/kernel.h>

#include <linux/types.h>

#include <linux/device.h>

#include <linux/wait.h>

#include <linux/sched.h>

#include <linux/poll.h>

#include <linux/input.h>

#include <asm/uaccess.h>

#include <asm/io.h>

#include <asm/poll.h>

MODULE_AUTHOR("shahaicao");

MODULE_DESCRIPTION("Mouse device");



static struct input_dev *mouse_dev;



static int __init mouse_init(void)

{



mouse_dev = input_allocate_device();



input_register_device(mouse_dev);

printk("hello come here");

return 0;

}



static void __exit mouse_exit(void)

{



input_unregister_device(mouse_dev);

input_free_device(mouse_dev);

printk("see you");

}



module_init(mouse_init);

module_exit(mouse_exit);

MODULE_LICENSE("GPL");
页: [1]
查看完整版本: 为什么安装驱动时没有打印信息呢?高手请给指点吧