summaryrefslogtreecommitdiffstats
path: root/sound/core
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-12-12 09:30:43 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:30:47 +0100
commit83e8ad6984dccd6d848ac91ba0df379ff968180b (patch)
tree5ae1f379de542b8ede18ab1cc65537b01b21d212 /sound/core
parent255bd169ab645970f77d3fd7ac800781f96ddccb (diff)
downloadop-kernel-dev-83e8ad6984dccd6d848ac91ba0df379ff968180b.zip
op-kernel-dev-83e8ad6984dccd6d848ac91ba0df379ff968180b.tar.gz
[ALSA] seq: remove struct snd_seq_client_callback
The fields of struct snd_seq_client_callback either aren't used or are always set to the same value, so we can get rid of it altogether. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/seq/oss/seq_oss_init.c9
-rw-r--r--sound/core/seq/seq_clientmgr.c9
-rw-r--r--sound/core/seq/seq_clientmgr.h2
-rw-r--r--sound/core/seq/seq_dummy.c6
-rw-r--r--sound/core/seq/seq_midi.c6
-rw-r--r--sound/core/seq/seq_system.c6
-rw-r--r--sound/core/seq/seq_virmidi.c7
7 files changed, 8 insertions, 37 deletions
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 97e2493..cd4139ad 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -65,7 +65,6 @@ int __init
snd_seq_oss_create_client(void)
{
int rc;
- struct snd_seq_client_callback callback;
struct snd_seq_client_info *info;
struct snd_seq_port_info *port;
struct snd_seq_port_callback port_callback;
@@ -78,13 +77,7 @@ snd_seq_oss_create_client(void)
}
/* create ALSA client */
- memset(&callback, 0, sizeof(callback));
-
- callback.private_data = NULL;
- callback.allow_input = 1;
- callback.allow_output = 1;
-
- rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS, &callback);
+ rc = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_OSS);
if (rc < 0)
goto __error;
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index 79199f5..bd8c098 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -2212,15 +2212,12 @@ static long snd_seq_ioctl(struct file *file, unsigned int cmd, unsigned long arg
/* exported to kernel modules */
-int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
- struct snd_seq_client_callback *callback)
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index)
{
struct snd_seq_client *client;
snd_assert(! in_interrupt(), return -EBUSY);
- if (callback == NULL)
- return -EINVAL;
if (card && client_index > 3)
return -EINVAL;
if (card == NULL && client_index > 63)
@@ -2244,8 +2241,8 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
}
usage_alloc(&client_usage, 1);
- client->accept_input = callback->allow_output;
- client->accept_output = callback->allow_input;
+ client->accept_input = 1;
+ client->accept_output = 1;
sprintf(client->name, "Client-%d", client->number);
diff --git a/sound/core/seq/seq_clientmgr.h b/sound/core/seq/seq_clientmgr.h
index 7131d21..450091c 100644
--- a/sound/core/seq/seq_clientmgr.h
+++ b/sound/core/seq/seq_clientmgr.h
@@ -91,8 +91,6 @@ struct snd_seq_client *snd_seq_client_use_ptr(int clientid);
int snd_seq_dispatch_event(struct snd_seq_event_cell *cell, int atomic, int hop);
/* exported to other modules */
-int snd_seq_register_kernel_client(struct snd_seq_client_callback *callback, void *private_data);
-int snd_seq_unregister_kernel_client(int client);
int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev,
struct file *file, int atomic, int hop);
diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c
index 8101a47..e7344b6 100644
--- a/sound/core/seq/seq_dummy.c
+++ b/sound/core/seq/seq_dummy.c
@@ -193,7 +193,6 @@ create_port(int idx, int type)
static int __init
register_client(void)
{
- struct snd_seq_client_callback cb;
struct snd_seq_client_info cinfo;
struct snd_seq_dummy_port *rec1, *rec2;
int i;
@@ -204,10 +203,7 @@ register_client(void)
}
/* create client */
- memset(&cb, 0, sizeof(cb));
- cb.allow_input = 1;
- cb.allow_output = 1;
- my_client = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_DUMMY, &cb);
+ my_client = snd_seq_create_kernel_client(NULL, SNDRV_SEQ_CLIENT_DUMMY);
if (my_client < 0)
return my_client;
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index 0a65eb2..512ffdd 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -295,7 +295,6 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev)
struct snd_rawmidi_info *info;
int newclient = 0;
unsigned int p, ports;
- struct snd_seq_client_callback callbacks;
struct snd_seq_port_callback pcallbacks;
struct snd_card *card = dev->card;
int device = dev->device;
@@ -334,10 +333,7 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev)
kfree(info);
return -ENOMEM;
}
- memset(&callbacks, 0, sizeof(callbacks));
- callbacks.private_data = client;
- callbacks.allow_input = callbacks.allow_output = 1;
- client->seq_client = snd_seq_create_kernel_client(card, 0, &callbacks);
+ client->seq_client = snd_seq_create_kernel_client(card, 0);
if (client->seq_client < 0) {
kfree(client);
up(&register_mutex);
diff --git a/sound/core/seq/seq_system.c b/sound/core/seq/seq_system.c
index 86b1cba..c87c883 100644
--- a/sound/core/seq/seq_system.c
+++ b/sound/core/seq/seq_system.c
@@ -120,8 +120,6 @@ static int event_input_timer(struct snd_seq_event * ev, int direct, void *privat
/* register our internal client */
int __init snd_seq_system_client_init(void)
{
-
- struct snd_seq_client_callback callbacks;
struct snd_seq_port_callback pcallbacks;
struct snd_seq_client_info *inf;
struct snd_seq_port_info *port;
@@ -134,14 +132,12 @@ int __init snd_seq_system_client_init(void)
return -ENOMEM;
}
- memset(&callbacks, 0, sizeof(callbacks));
memset(&pcallbacks, 0, sizeof(pcallbacks));
pcallbacks.owner = THIS_MODULE;
pcallbacks.event_input = event_input_timer;
/* register client */
- callbacks.allow_input = callbacks.allow_output = 1;
- sysclient = snd_seq_create_kernel_client(NULL, 0, &callbacks);
+ sysclient = snd_seq_create_kernel_client(NULL, 0);
/* set our name */
inf->client = 0;
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
index ea21139..2739f57 100644
--- a/sound/core/seq/seq_virmidi.c
+++ b/sound/core/seq/seq_virmidi.c
@@ -359,7 +359,6 @@ static struct snd_rawmidi_ops snd_virmidi_output_ops = {
static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
{
int client;
- struct snd_seq_client_callback callbacks;
struct snd_seq_port_callback pcallbacks;
struct snd_seq_client_info *info;
struct snd_seq_port_info *pinfo;
@@ -375,11 +374,7 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
goto __error;
}
- memset(&callbacks, 0, sizeof(callbacks));
- callbacks.private_data = rdev;
- callbacks.allow_input = 1;
- callbacks.allow_output = 1;
- client = snd_seq_create_kernel_client(rdev->card, rdev->device, &callbacks);
+ client = snd_seq_create_kernel_client(rdev->card, rdev->device);
if (client < 0) {
err = client;
goto __error;
OpenPOWER on IntegriCloud