Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751847Ab0LLI43 (ORCPT ); Sun, 12 Dec 2010 03:56:29 -0500 Received: from cantor.suse.de ([195.135.220.2]:47892 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751453Ab0LLI4Y (ORCPT ); Sun, 12 Dec 2010 03:56:24 -0500 Date: Sun, 12 Dec 2010 09:56:23 +0100 Message-ID: From: Takashi Iwai To: Tejun Heo Cc: linux-kernel@vger.kernel.org, Jaroslav Kysela , Liam Girdwood , Mark Brown Subject: Re: [PATCH 09/30] sound: don't use flush_scheduled_work() In-Reply-To: <1292086307-19211-10-git-send-email-tj@kernel.org> References: <1292086307-19211-1-git-send-email-tj@kernel.org> <1292086307-19211-10-git-send-email-tj@kernel.org> User-Agent: Wanderlust/2.15.6 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.7 Emacs/23.2 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2440 Lines: 69 At Sat, 11 Dec 2010 17:51:26 +0100, Tejun Heo wrote: > > flush_scheduled_work() is deprecated and scheduled to be removed. > > * cancel[_delayed]_work() + flush_scheduled_work() -> > cancel[_delayed]_work_sync(). > > * wm8350, wm8753 and soc-core use custom code to cancel a delayed > work, execute it immediately if it was pending and wait for its > completion. This is equivalent to flush_delayed_work_sync(). Use > it instead. > > Signed-off-by: Tejun Heo > Cc: Takashi Iwai > Cc: Jaroslav Kysela > --- > This is part of a series to remove flush_scheduled_work() usage to > prepare for deprecation of flush_scheduled_work(). Patches in this > series are self contained and mostly straight-forward. > > Please feel free to take it into the appropriate tree, or just ack it. > In the latter case, I'll merge the patch through the workqueue tree > during the next merge window. The most of parts look OK to me, but I'm not sure about ASoC changes, e.g. below one: > diff --git a/sound/soc/codecs/wm8350.c b/sound/soc/codecs/wm8350.c > index 7611add..b3e9fac 100644 > --- a/sound/soc/codecs/wm8350.c > +++ b/sound/soc/codecs/wm8350.c > @@ -1626,7 +1626,6 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec) > { > struct wm8350_data *priv = snd_soc_codec_get_drvdata(codec); > struct wm8350 *wm8350 = dev_get_platdata(codec->dev); > - int ret; > > wm8350_clear_bits(wm8350, WM8350_JACK_DETECT, > WM8350_JDL_ENA | WM8350_JDR_ENA); > @@ -1641,15 +1640,9 @@ static int wm8350_codec_remove(struct snd_soc_codec *codec) > priv->hpr.jack = NULL; > priv->mic.jack = NULL; > > - /* cancel any work waiting to be queued. */ > - ret = cancel_delayed_work(&codec->delayed_work); > - > /* if there was any work waiting then we run it now and > * wait for its completion */ > - if (ret) { > - schedule_delayed_work(&codec->delayed_work, 0); > - flush_scheduled_work(); > - } > + flush_delayed_work_sync(&codec->delayed_work); I vaguely remember Liam introduced this kind of code by some reason. Liam, isn't it better for cancel_delayed_work_sync(), or should it be like the above? thanks, Takashi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/