m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/harddoom_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'harddoom_main.c')
-rw-r--r--harddoom_main.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/harddoom_main.c b/harddoom_main.c
new file mode 100644
index 0000000..9ffe62f
--- /dev/null
+++ b/harddoom_main.c
@@ -0,0 +1,30 @@
+#include <linux/module.h>
+#include <linux/kernel.h>
+
+#include "pci.h"
+
+MODULE_LICENSE("GPL");
+
+int harddoom_init(void)
+{
+ int err = 0;
+ printk(KERN_INFO "Initializing harddoom\n");
+ err = pci_init();
+ if (err < 0) {
+ goto error;
+ }
+
+ return 0;
+
+error:
+ return err;
+}
+
+void harddoom_cleanup(void)
+{
+ printk(KERN_INFO "Removing harddoom\n");
+ pci_cleanup();
+}
+
+module_init(harddoom_init);
+module_exit(harddoom_cleanup);