infra: export del_channel() for general use

This commit is contained in:
Thomas Schoebel-Theuer 2013-04-08 09:14:23 +02:00
parent ad06f69514
commit a693f0bc50
2 changed files with 6 additions and 1 deletions

View File

@ -244,13 +244,15 @@ void rollover_all(void)
}
EXPORT_SYMBOL_GPL(rollover_all);
static
void del_channel(struct say_channel *ch)
{
struct say_channel *tmp;
struct say_channel **_tmp;
int i, j;
if (!ch)
return;
write_lock(&say_lock);
for (_tmp = &channel_list; (tmp = *_tmp) != NULL; _tmp = &tmp->ch_next) {
if (tmp == ch) {
@ -281,6 +283,7 @@ void del_channel(struct say_channel *ch)
kfree(ch);
atomic_dec(&say_alloc_channels);
}
EXPORT_SYMBOL_GPL(del_channel);
static
struct say_channel *_make_channel(const char *name)

View File

@ -28,6 +28,8 @@ extern struct say_channel *default_channel;
extern struct say_channel *make_channel(const char *name);
extern void del_channel(struct say_channel *ch);
extern void bind_to_channel(struct say_channel *ch, struct task_struct *whom);
#define bind_me(_name) \