From: Stefan Schweizer Date: Mon, 15 May 2006 16:43:52 +0000 (-0700) Subject: [PATCH] Fix capi reload by unregistering the correct major X-Git-Tag: v2.6.17-rc5~154 X-Git-Url: http://pilppa.org/gitweb/?a=commitdiff_plain;h=90d5ede5985f3b172cc3ccd89bf8c52a209088a5;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/isdn/capi/capi.c b/drivers/isdn/capi/capi.c index 9b493f0becc..173c899a1fb 100644 --- a/drivers/isdn/capi/capi.c +++ b/drivers/isdn/capi/capi.c @@ -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");