统一 MODULE 声明.

Signed-off-by: rick.chan <chenyang@autoai.com>
This commit is contained in:
rick.chan 2020-12-16 15:13:44 +08:00
parent c524f83562
commit a96875806b
6 changed files with 61 additions and 2 deletions

View File

@ -301,3 +301,8 @@ module_param(demo_major, int, S_IRUGO);
module_init(demo_init);
module_exit(demo_exit);
MODULE_AUTHOR("Rick Chan <cy187lion@sina.com>");
MODULE_DESCRIPTION("Char driver demo");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");

View File

@ -163,3 +163,8 @@ static void __exit demo_exit(void)
module_init(demo_init);
module_exit(demo_exit);
MODULE_AUTHOR("Rick Chan <cy187lion@sina.com>");
MODULE_DESCRIPTION("Misc driver demo");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");

View File

@ -236,7 +236,7 @@ static struct platform_driver mfis_driver = {
module_platform_driver(mfis_driver)
MODULE_AUTHOR("Rick Chan");
MODULE_AUTHOR("Rick Chan <cy187lion@sina.com>");
MODULE_DESCRIPTION("platform driver demo");
MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("mfis driver");
MODULE_VERSION("1.0.0");

View File

@ -301,3 +301,8 @@ module_param(demo_major, int, S_IRUGO);
module_init(demo_init);
module_exit(demo_exit);
MODULE_AUTHOR("Rick Chan <cy187lion@sina.com>");
MODULE_DESCRIPTION("Char driver demo");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");

View File

@ -0,0 +1,39 @@
#include <linux/input.h>
#include <linux/module.h>
#include <linux/init.h>
struct input_dev *demo_touch_a;
static int __init demo_touch_a_init(void)
{
int ret;
demo_touch_a = input_allocate_device();
set_bit(EV_KEY, demo_touch_a->evbit);
set_bit(EV_ABS, demo_touch_a->evbit);
set_bit(BTN_TOUCH, demo_touch_a->keybit);
input_set_abs_params(demo_touch_a, ABS_X, 0, 0X3FF, 0, 0);
input_set_abs_params(demo_touch_a, ABS_Y, 0, 0X3FF, 0, 0);
input_set_abs_params(demo_touch_a, ABS_PRESSURE, 0, 1, 0, 0);
ret = input_register_device(demo_touch_a);
if (ret != 0) {
printk(KERN_ERR"[demo_touch_a]input_register_device failed\n");
}
return ret;
}
static void __exit demo_touch_a_exit(void)
{
input_unregister_device(demo_touch_a);
}
module_init(demo_touch_a_init);
module_exit(demo_touch_a_exit);
MODULE_AUTHOR("Rick Chan <cy187lion@sina.com>");
MODULE_DESCRIPTION("Touch driver demo");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");

View File

@ -163,3 +163,8 @@ static void __exit demo_exit(void)
module_init(demo_init);
module_exit(demo_exit);
MODULE_AUTHOR("Rick Chan <cy187lion@sina.com>");
MODULE_DESCRIPTION("Misc driver demo");
MODULE_LICENSE("GPL");
MODULE_VERSION("1.0.0");