Re: [PATCH] New virtual device snd_disconnected rc5

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At Fri, 6 Oct 2006 14:15:50 +0200,
Karsten Wiese wrote:
> 
> --- alsa-kernel/core/init.c	2006-09-29 13:40:32.000000000 +0200
> +++ alsa-kernel/core/init.c	2006-10-06 00:25:44.000000000 +0200
> @@ -33,10 +33,10 @@
>  #include <sound/control.h>
>  #include <sound/info.h>
>  
> -struct snd_shutdown_f_ops {
> -	struct file_operations f_ops;
> -	struct snd_shutdown_f_ops *next;
> -};
> +static DEFINE_SPINLOCK(shutdown_mutex);

Let's rename from mutex to lock if it's spinlock :)

> +static LIST_HEAD(shutdown_files);
> +
> +static struct file_operations snd_shutdown_f_ops;
>  
>  static unsigned int snd_cards_lock;	/* locked for registering/using */
>  struct snd_card *snd_cards[SNDRV_CARDS];
> @@ -198,6 +198,28 @@
>  	return -ENODEV;
>  }
>  
> +static int snd_disconnect_release(struct inode *inode, struct file *file)
> +{
> +	struct snd_monitor_file *df = NULL;
> +	struct list_head *entry;
> +
> +	spin_lock(&shutdown_mutex);
> +	list_for_each(entry, &shutdown_files) {

You can use list_for_each_entry() to remove one more variable.

Otherwise the code looks OK.  Could you fix the above, then I'll merge
to the ALSA tree.


Thanks,

Takashi

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux