The patch titled gigaset: fix module reference counting has been removed from the -mm tree. Its filename was gigaset-fix-module-reference-counting.patch This patch was dropped because it was withdrawn The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: gigaset: fix module reference counting From: Andreas Herrmann <aherrman@xxxxxxxx> bas_gigaset can't be unloaded due to wrong module reference counting. Ensure that module_put is called whenever a channel is freed. Signed-off-by: Andreas Herrmann <aherrman@xxxxxxxx> Cc: Tilmann Schmidt <tilman@xxxxxxx> Cc: Hansjoerg Lipp <hjlipp@xxxxxx> Cc: Karsten Keil <kkeil@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- drivers/isdn/gigaset/common.c | 5 +---- drivers/isdn/gigaset/gigaset.h | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff -puN drivers/isdn/gigaset/common.c~gigaset-fix-module-reference-counting drivers/isdn/gigaset/common.c --- a/drivers/isdn/gigaset/common.c~gigaset-fix-module-reference-counting +++ a/drivers/isdn/gigaset/common.c @@ -184,7 +184,6 @@ int gigaset_get_channel(struct bc_state return 0; } ++bcs->use_count; - bcs->busy = 1; gig_dbg(DEBUG_ANY, "allocated channel %d", bcs->channel); spin_unlock_irqrestore(&bcs->cs->lock, flags); return 1; @@ -195,13 +194,12 @@ void gigaset_free_channel(struct bc_stat unsigned long flags; spin_lock_irqsave(&bcs->cs->lock, flags); - if (!bcs->busy) { + if (!bcs->use_count) { gig_dbg(DEBUG_ANY, "could not free channel %d", bcs->channel); spin_unlock_irqrestore(&bcs->cs->lock, flags); return; } --bcs->use_count; - bcs->busy = 0; module_put(bcs->cs->driver->owner); gig_dbg(DEBUG_ANY, "freed channel %d", bcs->channel); spin_unlock_irqrestore(&bcs->cs->lock, flags); @@ -589,7 +587,6 @@ static struct bc_state *gigaset_initbcs( bcs->chstate = 0; bcs->use_count = 1; - bcs->busy = 0; bcs->ignore = cs->ignoreframes; for (i = 0; i < AT_NUM; ++i) diff -puN drivers/isdn/gigaset/gigaset.h~gigaset-fix-module-reference-counting drivers/isdn/gigaset/gigaset.h --- a/drivers/isdn/gigaset/gigaset.h~gigaset-fix-module-reference-counting +++ a/drivers/isdn/gigaset/gigaset.h @@ -419,7 +419,6 @@ struct bc_state { #ifdef CONFIG_GIGASET_DEBUG int emptycount; #endif - int busy; int use_count; /* private data of hardware drivers */ _ Patches currently in -mm which might be from aherrman@xxxxxxxx are gigaset-fix-module-reference-counting.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html