From patchwork Wed Dec 21 06:56:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 5919 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 3F63D23E01 for ; Wed, 21 Dec 2011 06:55:42 +0000 (UTC) Received: from mail-ey0-f180.google.com (mail-ey0-f180.google.com [209.85.215.180]) by fiordland.canonical.com (Postfix) with ESMTP id 29CEEA182FE for ; Wed, 21 Dec 2011 06:55:42 +0000 (UTC) Received: by eaac11 with SMTP id c11so4237158eaa.11 for ; Tue, 20 Dec 2011 22:55:42 -0800 (PST) Received: by 10.204.129.24 with SMTP id m24mr1729030bks.89.1324450541937; Tue, 20 Dec 2011 22:55:41 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.82.144 with SMTP id ac16cs31983bkc; Tue, 20 Dec 2011 22:55:41 -0800 (PST) Received: by 10.180.19.138 with SMTP id f10mr14345340wie.3.1324450540502; Tue, 20 Dec 2011 22:55:40 -0800 (PST) Received: from mail-we0-f178.google.com (mail-we0-f178.google.com [74.125.82.178]) by mx.google.com with ESMTPS id ec10si13961691wib.49.2011.12.20.22.55.40 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Dec 2011 22:55:40 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dmitry.antipov@linaro.org) client-ip=74.125.82.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.178 is neither permitted nor denied by best guess record for domain of dmitry.antipov@linaro.org) smtp.mail=dmitry.antipov@linaro.org Received: by werp12 with SMTP id p12so3247393wer.37 for ; Tue, 20 Dec 2011 22:55:40 -0800 (PST) Received: by 10.216.136.70 with SMTP id v48mr2802854wei.48.1324450540290; Tue, 20 Dec 2011 22:55:40 -0800 (PST) Received: from [192.168.0.171] ([78.153.153.8]) by mx.google.com with ESMTPS id ei9sm11089713wid.0.2011.12.20.22.55.39 (version=SSLv3 cipher=OTHER); Tue, 20 Dec 2011 22:55:39 -0800 (PST) Message-ID: <4EF18310.6080801@linaro.org> Date: Wed, 21 Dec 2011 10:56:16 +0400 From: Dmitry Antipov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111115 Thunderbird/8.0 MIME-Version: 1.0 To: linaro-dev@lists.linaro.org CC: patches@linaro.org, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] mmc: use usleep_range() in mmc_delay() >From f447d78db65c6675e69466e8ed08364ff065ac08 Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 21 Dec 2011 10:51:03 +0400 Subject: [PATCH] mmc: use usleep_range() in mmc_delay() --- drivers/mmc/core/core.h | 8 ++------ 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index 14664f1..a77851e 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -47,12 +47,8 @@ void mmc_power_off(struct mmc_host *host); static inline void mmc_delay(unsigned int ms) { - if (ms < 1000 / HZ) { - cond_resched(); - mdelay(ms); - } else { - msleep(ms); - } + unsigned long us = ms * USEC_PER_MSEC; + usleep_range(us, us + 1000); } void mmc_rescan(struct work_struct *work);