start io subsystem
This commit is contained in:
@ -6,6 +6,8 @@
|
||||
#include "ls7366r.h"
|
||||
#include "trigger.h"
|
||||
#include "leds.h"
|
||||
#include "io.h"
|
||||
|
||||
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Wolfgang Hottgenroth");
|
||||
@ -15,6 +17,12 @@ MODULE_DESCRIPTION("Driver for the MainsCnt measurement hat");
|
||||
|
||||
/* module loading and unloading */
|
||||
static int __init my_init(void) {
|
||||
printk("counter - Loading IO subsystem...\n");
|
||||
if (io_init()) {
|
||||
printk("counter - Error! Could not load IO subsystem\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printk("counter - Loading the leds driver...\n");
|
||||
if(platform_driver_register(&leds_driver)) {
|
||||
printk("counter - Error! Could not load leds driver\n");
|
||||
@ -45,6 +53,9 @@ static void __exit my_exit(void) {
|
||||
|
||||
printk("counter - Unloading the interrupt driver...\n");
|
||||
platform_driver_unregister(&interrupt_driver);
|
||||
|
||||
printk("counter - Unloading IO subsystem...\n");
|
||||
io_exit();
|
||||
}
|
||||
|
||||
module_init(my_init);
|
||||
|
Reference in New Issue
Block a user