Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90d5ede5 authored by Stefan Schweizer's avatar Stefan Schweizer Committed by Linus Torvalds
Browse files

[PATCH] Fix capi reload by unregistering the correct major



I am having the bug FATAL: Error inserting capi ([..]/capi.ko): Device or
resource busy when I try to reload capi after loading it.  in dmesg:
capi20: unable to get major 68

Fix the issue which is caused by setting the major to zero when registering
the chrdev succeeded.

(akpm: this means that we can again not use `major=0' (dynamic major
allocation) for this driver).

Cc: Karsten Keil <kkeil@suse.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a5370553
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1499,7 +1499,6 @@ static int __init capi_init(void)
		printk(KERN_ERR "capi20: unable to get major %d\n", capi_major);
		return major_ret;
	}
	capi_major = major_ret;
	capi_class = class_create(THIS_MODULE, "capi");
	if (IS_ERR(capi_class)) {
		unregister_chrdev(capi_major, "capi20");