Commit d698ad03 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] telephony/ixj.c cleanup

- remove ixj_register and ixj_unregister. these were EXPORT_SYMBOL'ed static
  (sic) functions it seems the only reason why this "worked" was that there
  were exactly zero users of them...

- remove four local variables that are after this removal no longer
  required

- make five functions that were needlessly global static
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 38326f78
...@@ -406,14 +406,10 @@ static int Stub(IXJ * J, unsigned long arg) ...@@ -406,14 +406,10 @@ static int Stub(IXJ * J, unsigned long arg)
return 0; return 0;
} }
static IXJ_REGFUNC ixj_DownloadG729 = &Stub;
static IXJ_REGFUNC ixj_DownloadTS85 = &Stub;
static IXJ_REGFUNC ixj_PreRead = &Stub; static IXJ_REGFUNC ixj_PreRead = &Stub;
static IXJ_REGFUNC ixj_PostRead = &Stub; static IXJ_REGFUNC ixj_PostRead = &Stub;
static IXJ_REGFUNC ixj_PreWrite = &Stub; static IXJ_REGFUNC ixj_PreWrite = &Stub;
static IXJ_REGFUNC ixj_PostWrite = &Stub; static IXJ_REGFUNC ixj_PostWrite = &Stub;
static IXJ_REGFUNC ixj_PreIoctl = &Stub;
static IXJ_REGFUNC ixj_PostIoctl = &Stub;
static void ixj_read_frame(IXJ *j); static void ixj_read_frame(IXJ *j);
static void ixj_write_frame(IXJ *j); static void ixj_write_frame(IXJ *j);
...@@ -792,97 +788,6 @@ static int ixj_wink(IXJ *j) ...@@ -792,97 +788,6 @@ static int ixj_wink(IXJ *j)
return 0; return 0;
} }
static int ixj_register(int index, IXJ_REGFUNC regfunc)
{
int cnt;
int retval = 0;
switch (index) {
case G729LOADER:
ixj_DownloadG729 = regfunc;
for (cnt = 0; cnt < IXJMAX; cnt++) {
IXJ *j = get_ixj(cnt);
while(test_and_set_bit(cnt, (void *)&j->busyflags) != 0) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
}
ixj_DownloadG729(j, 0L);
clear_bit(cnt, &j->busyflags);
}
break;
case TS85LOADER:
ixj_DownloadTS85 = regfunc;
for (cnt = 0; cnt < IXJMAX; cnt++) {
IXJ *j = get_ixj(cnt);
while(test_and_set_bit(cnt, (void *)&j->busyflags) != 0) {
set_current_state(TASK_INTERRUPTIBLE);
schedule_timeout(1);
}
ixj_DownloadTS85(j, 0L);
clear_bit(cnt, &j->busyflags);
}
break;
case PRE_READ:
ixj_PreRead = regfunc;
break;
case POST_READ:
ixj_PostRead = regfunc;
break;
case PRE_WRITE:
ixj_PreWrite = regfunc;
break;
case POST_WRITE:
ixj_PostWrite = regfunc;
break;
case PRE_IOCTL:
ixj_PreIoctl = regfunc;
break;
case POST_IOCTL:
ixj_PostIoctl = regfunc;
break;
default:
retval = 1;
}
return retval;
}
EXPORT_SYMBOL(ixj_register);
static int ixj_unregister(int index)
{
int retval = 0;
switch (index) {
case G729LOADER:
ixj_DownloadG729 = &Stub;
break;
case TS85LOADER:
ixj_DownloadTS85 = &Stub;
break;
case PRE_READ:
ixj_PreRead = &Stub;
break;
case POST_READ:
ixj_PostRead = &Stub;
break;
case PRE_WRITE:
ixj_PreWrite = &Stub;
break;
case POST_WRITE:
ixj_PostWrite = &Stub;
break;
case PRE_IOCTL:
ixj_PreIoctl = &Stub;
break;
case POST_IOCTL:
ixj_PostIoctl = &Stub;
break;
default:
retval = 1;
}
return retval;
}
EXPORT_SYMBOL(ixj_unregister);
static void ixj_init_timer(IXJ *j) static void ixj_init_timer(IXJ *j)
{ {
init_timer(&j->timer); init_timer(&j->timer);
...@@ -2257,7 +2162,7 @@ static int ixj_open(struct phone_device *p, struct file *file_p) ...@@ -2257,7 +2162,7 @@ static int ixj_open(struct phone_device *p, struct file *file_p)
return 0; return 0;
} }
int ixj_release(struct inode *inode, struct file *file_p) static int ixj_release(struct inode *inode, struct file *file_p)
{ {
IXJ_TONE ti; IXJ_TONE ti;
int cnt; int cnt;
...@@ -6785,7 +6690,7 @@ static int ixj_fasync(int fd, struct file *file_p, int mode) ...@@ -6785,7 +6690,7 @@ static int ixj_fasync(int fd, struct file *file_p, int mode)
return fasync_helper(fd, file_p, mode, &j->async_queue); return fasync_helper(fd, file_p, mode, &j->async_queue);
} }
struct file_operations ixj_fops = static struct file_operations ixj_fops =
{ {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.read = ixj_enhanced_read, .read = ixj_enhanced_read,
...@@ -7735,7 +7640,7 @@ static IXJ *new_ixj(unsigned long port) ...@@ -7735,7 +7640,7 @@ static IXJ *new_ixj(unsigned long port)
return res; return res;
} }
int __init ixj_probe_isapnp(int *cnt) static int __init ixj_probe_isapnp(int *cnt)
{ {
int probe = 0; int probe = 0;
int func = 0x110; int func = 0x110;
...@@ -7815,7 +7720,7 @@ int __init ixj_probe_isapnp(int *cnt) ...@@ -7815,7 +7720,7 @@ int __init ixj_probe_isapnp(int *cnt)
return probe; return probe;
} }
int __init ixj_probe_isa(int *cnt) static int __init ixj_probe_isa(int *cnt)
{ {
int i, probe; int i, probe;
...@@ -7839,7 +7744,7 @@ int __init ixj_probe_isa(int *cnt) ...@@ -7839,7 +7744,7 @@ int __init ixj_probe_isa(int *cnt)
return 0; return 0;
} }
int __init ixj_probe_pci(int *cnt) static int __init ixj_probe_pci(int *cnt)
{ {
struct pci_dev *pci = NULL; struct pci_dev *pci = NULL;
int i, probe = 0; int i, probe = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment