]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - sound/core/seq/seq_clientmgr.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[linux-2.6-omap-h63xx.git] / sound / core / seq / seq_clientmgr.c
index bb15d9ee8842a05c60ae31528b80defe8b3eb4ad..694efe832b6787f9aa683635c42a00346d626aab 100644 (file)
@@ -659,7 +659,6 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
        int err = 0, num_ev = 0;
        struct snd_seq_event event_saved;
        struct snd_seq_client_port *src_port;
-       struct list_head *p;
        struct snd_seq_port_subs_info *grp;
 
        src_port = snd_seq_port_use_ptr(client, event->source.port);
@@ -674,8 +673,7 @@ static int deliver_to_subscribers(struct snd_seq_client *client,
                read_lock(&grp->list_lock);
        else
                down_read(&grp->list_mutex);
-       list_for_each(p, &grp->list_head) {
-               subs = list_entry(p, struct snd_seq_subscribers, src_list);
+       list_for_each_entry(subs, &grp->list_head, src_list) {
                event->dest = subs->info.dest;
                if (subs->info.flags & SNDRV_SEQ_PORT_SUBS_TIMESTAMP)
                        /* convert time according to flag with subscription */
@@ -709,15 +707,14 @@ static int port_broadcast_event(struct snd_seq_client *client,
 {
        int num_ev = 0, err = 0;
        struct snd_seq_client *dest_client;
-       struct list_head *p;
+       struct snd_seq_client_port *port;
 
        dest_client = get_event_dest_client(event, SNDRV_SEQ_FILTER_BROADCAST);
        if (dest_client == NULL)
                return 0; /* no matching destination */
 
        read_lock(&dest_client->ports_lock);
-       list_for_each(p, &dest_client->ports_list_head) {
-               struct snd_seq_client_port *port = list_entry(p, struct snd_seq_client_port, list);
+       list_for_each_entry(port, &dest_client->ports_list_head, list) {
                event->dest.port = port->addr.port;
                /* pass NULL as source client to avoid error bounce */
                err = snd_seq_deliver_single_event(NULL, event,
@@ -1714,6 +1711,8 @@ int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo)
        return snd_seq_queue_timer_set_tempo(tempo->queue, client, tempo);
 }
 
+EXPORT_SYMBOL(snd_seq_set_queue_tempo);
+
 static int snd_seq_ioctl_set_queue_tempo(struct snd_seq_client *client,
                                         void __user *arg)
 {
@@ -2264,6 +2263,8 @@ int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
        return client->number;
 }
 
+EXPORT_SYMBOL(snd_seq_create_kernel_client);
+
 /* exported to kernel modules */
 int snd_seq_delete_kernel_client(int client)
 {
@@ -2280,6 +2281,7 @@ int snd_seq_delete_kernel_client(int client)
        return 0;
 }
 
+EXPORT_SYMBOL(snd_seq_delete_kernel_client);
 
 /* skeleton to enqueue event, called from snd_seq_kernel_client_enqueue
  * and snd_seq_kernel_client_enqueue_blocking
@@ -2328,6 +2330,8 @@ int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event * ev,
        return kernel_client_enqueue(client, ev, NULL, 0, atomic, hop);
 }
 
+EXPORT_SYMBOL(snd_seq_kernel_client_enqueue);
+
 /*
  * exported, called by kernel clients to enqueue events (with blocking)
  *
@@ -2340,6 +2344,7 @@ int snd_seq_kernel_client_enqueue_blocking(int client, struct snd_seq_event * ev
        return kernel_client_enqueue(client, ev, file, 1, atomic, hop);
 }
 
+EXPORT_SYMBOL(snd_seq_kernel_client_enqueue_blocking);
 
 /* 
  * exported, called by kernel clients to dispatch events directly to other
@@ -2376,6 +2381,7 @@ int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event * ev,
        return result;
 }
 
+EXPORT_SYMBOL(snd_seq_kernel_client_dispatch);
 
 /*
  * exported, called by kernel clients to perform same functions as with
@@ -2396,6 +2402,7 @@ int snd_seq_kernel_client_ctl(int clientid, unsigned int cmd, void *arg)
        return result;
 }
 
+EXPORT_SYMBOL(snd_seq_kernel_client_ctl);
 
 /* exported (for OSS emulator) */
 int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait)
@@ -2413,6 +2420,8 @@ int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table
        return 0;
 }
 
+EXPORT_SYMBOL(snd_seq_kernel_client_write_poll);
+
 /*---------------------------------------------------------------------------*/
 
 #ifdef CONFIG_PROC_FS
@@ -2461,11 +2470,10 @@ static void snd_seq_info_dump_subscribers(struct snd_info_buffer *buffer,
 static void snd_seq_info_dump_ports(struct snd_info_buffer *buffer,
                                    struct snd_seq_client *client)
 {
-       struct list_head *l;
+       struct snd_seq_client_port *p;
 
        mutex_lock(&client->ports_mutex);
-       list_for_each(l, &client->ports_list_head) {
-               struct snd_seq_client_port *p = list_entry(l, struct snd_seq_client_port, list);
+       list_for_each_entry(p, &client->ports_list_head, list) {
                snd_iprintf(buffer, "  Port %3d : \"%s\" (%c%c%c%c)\n",
                            p->addr.port, p->name,
                            FLAG_PERM_RD(p->capability),
@@ -2530,7 +2538,7 @@ void snd_seq_info_clients_read(struct snd_info_entry *entry,
  *  REGISTRATION PART
  */
 
-static struct file_operations snd_seq_f_ops =
+static const struct file_operations snd_seq_f_ops =
 {
        .owner =        THIS_MODULE,
        .read =         snd_seq_read,