Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752461AbdFAQkg (ORCPT ); Thu, 1 Jun 2017 12:40:36 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:33105 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751866AbdFAPog (ORCPT ); Thu, 1 Jun 2017 11:44:36 -0400 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Mark Brown" , "Nicholas Mc Guire" Date: Thu, 01 Jun 2017 16:43:15 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 031/212] ASoC: rt5640: use msleep() for long delays In-Reply-To: X-SA-Exim-Connect-IP: 82.70.136.246 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1213 Lines: 41 3.16.44-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Nicholas Mc Guire commit 4a312c9c825adf74c0026c98fed4ab59ce190863 upstream. ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 70/80ms delays here passing the "min" value to msleep(). This reduces the load on the hrtimer subsystem. Link: http://lkml.org/lkml/2017/1/11/377 Fixes: commit 246693ba7b0b ("ASoC: rt5640: change widget sequence for depop") Signed-off-by: Nicholas Mc Guire Signed-off-by: Mark Brown Signed-off-by: Ben Hutchings --- sound/soc/codecs/rt5640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -974,7 +974,7 @@ static int rt5640_hp_event(struct snd_so case SND_SOC_DAPM_PRE_PMD: rt5640->hp_mute = 1; - usleep_range(70000, 75000); + msleep(70); break; default: @@ -1038,7 +1038,7 @@ static int rt5640_hp_post_event(struct s switch (event) { case SND_SOC_DAPM_POST_PMU: if (!rt5640->hp_mute) - usleep_range(80000, 85000); + msleep(80); break;