blob: 76ba1d8e41f30a0d3b2d27ce45c29c8b71f3cedf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#include <linux/init.h>
#include <linux/io.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include "platform.h"
static const struct of_device_id lork_ids[] = {
{ .compatible = "gpio-extern" },
{},
};
struct platform_driver lork_driver = {
.probe = lork_probe,
.remove = lork_remove,
.driver = {
.name = "gpio-extern",
.owner = THIS_MODULE,
.of_match_table = of_match_ptr(lork_ids),
}
};
static int mod_init(void) {
printk("%s()\n", __PRETTY_FUNCTION__);
return platform_driver_register(&lork_driver);
}
static void mod_exit(void) {
printk("%s()\n", __PRETTY_FUNCTION__);
platform_driver_unregister(&lork_driver);
}
module_init(mod_init);
module_exit(mod_exit);
MODULE_LICENSE("Dual MIT/GPL");
|