improvement: __init and __exit macro
This commit is contained in:
parent
7cd528626d
commit
2dbe1f3d51
4
main.c
4
main.c
|
@ -40,7 +40,7 @@ static int char_dev_uevent(struct device *dev, struct kobj_uevent_env *env) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int char_dev_init(void) {
|
||||
static int __init char_dev_init(void) {
|
||||
int err, i;
|
||||
dev_t dev;
|
||||
size_t dev_num;
|
||||
|
@ -70,7 +70,7 @@ static int char_dev_init(void) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void char_dev_exit(void) {
|
||||
static void __exit char_dev_exit(void) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < DEVICES_AMOUNT; i++) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user