From: Takashi Iwai Subject: Re: [PATCH] New virtual device snd_disconnected rc5 Date: Fri, 06 Oct 2006 15:06:44 +0200 Message-ID: References: <200610051253.46779.annabellesgarden@yahoo.de> <200610051717.53608.annabellesgarden@yahoo.de> <200610061355.44559.annabellesgarden@yahoo.de> <200610061415.51120.annabellesgarden@yahoo.de> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200610061415.51120.annabellesgarden@yahoo.de> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@lists.sourceforge.net Errors-To: alsa-devel-bounces@lists.sourceforge.net To: Karsten Wiese Cc: alsa-devel@lists.sourceforge.net, Jaroslav Kysela List-Id: alsa-devel@alsa-project.org 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 > #include > > -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