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.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/harddoom_main.c b/harddoom_main.c
index 9ffe62f..300c910 100644
--- a/harddoom_main.c
+++ b/harddoom_main.c
@@ -1,29 +1,31 @@
#include <linux/module.h>
#include <linux/kernel.h>
+#include "char.h"
#include "pci.h"
+#include "util.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;
- }
+
+ ORFAIL(char_init(), error_char) ;
+ ORFAIL(pci_init(), error_pci);
return 0;
-error:
+error_pci:
+ char_cleanup();
+error_char:
return err;
}
void harddoom_cleanup(void)
{
- printk(KERN_INFO "Removing harddoom\n");
pci_cleanup();
+ char_cleanup();
}
module_init(harddoom_init);