summaryrefslogtreecommitdiff
path: root/hello
diff options
context:
space:
mode:
Diffstat (limited to 'hello')
-rw-r--r--hello/Makefile1
-rw-r--r--hello/hello-chardev.c23
2 files changed, 24 insertions, 0 deletions
diff --git a/hello/Makefile b/hello/Makefile
index d63aa3d..f6299e0 100644
--- a/hello/Makefile
+++ b/hello/Makefile
@@ -2,6 +2,7 @@ obj-m += hello-1.o
obj-m += hello-2.o
obj-m += hello-3.o
obj-m += hello-4.o
+obj-m += hello-chardev.o
obj-m += startstop.o
startstop-objs := start.o stop.o
diff --git a/hello/hello-chardev.c b/hello/hello-chardev.c
new file mode 100644
index 0000000..a8a80d8
--- /dev/null
+++ b/hello/hello-chardev.c
@@ -0,0 +1,23 @@
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+
+extern void dumb(void);
+
+static int __init hello_2_init(void)
+{
+// printk(KERN_INFO "Buffer: %s (%p)\n", chardev_buffer, chardev_buffer);
+ dumb();
+ return 0;
+}
+
+static void __exit hello_2_exit(void)
+{
+}
+
+module_init(hello_2_init);
+module_exit(hello_2_exit);
+
+MODULE_AUTHOR("Guillermo Ramos");
+MODULE_LICENSE("GPL");
+MODULE_DESCRIPTION("Módulo tonto");