From patchwork Wed Dec 21 07:07:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Antipov X-Patchwork-Id: 5922 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 A781D23E10 for ; Wed, 21 Dec 2011 07:06:47 +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 96180A18470 for ; Wed, 21 Dec 2011 07:06:47 +0000 (UTC) Received: by eaac11 with SMTP id c11so4243839eaa.11 for ; Tue, 20 Dec 2011 23:06:47 -0800 (PST) Received: by 10.204.136.194 with SMTP id s2mr1716628bkt.96.1324451207337; Tue, 20 Dec 2011 23:06:47 -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 ac16cs32147bkc; Tue, 20 Dec 2011 23:06:47 -0800 (PST) Received: by 10.227.197.78 with SMTP id ej14mr5120447wbb.2.1324451205922; Tue, 20 Dec 2011 23:06:45 -0800 (PST) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx.google.com with ESMTPS id fx12si2308565wbb.126.2011.12.20.23.06.45 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 20 Dec 2011 23:06:45 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.178 is neither permitted nor denied by best guess record for domain of dmitry.antipov@linaro.org) client-ip=209.85.212.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.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 wibhi5 with SMTP id hi5so2251752wib.37 for ; Tue, 20 Dec 2011 23:06:45 -0800 (PST) Received: by 10.180.19.74 with SMTP id c10mr11279003wie.8.1324451205778; Tue, 20 Dec 2011 23:06:45 -0800 (PST) Received: from [192.168.0.171] ([78.153.153.8]) by mx.google.com with ESMTPS id w8sm11145207wiz.4.2011.12.20.23.06.44 (version=SSLv3 cipher=OTHER); Tue, 20 Dec 2011 23:06:45 -0800 (PST) Message-ID: <4EF185AA.2000006@linaro.org> Date: Wed, 21 Dec 2011 11:07:22 +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-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ohci-hcd: ohci-hcd: use usleep_range() instead of mdelay() >From ac60fe289eef3d81009f2b14a12acbac3e71878b Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Wed, 21 Dec 2011 11:05:27 +0400 Subject: [PATCH] ohci-hcd: use usleep_range() instead of mdelay() --- drivers/usb/host/ohci-hcd.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index b263919..a6d58da 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c @@ -574,6 +574,7 @@ static int ohci_run (struct ohci_hcd *ohci) u32 mask, val; int first = ohci->fminterval == 0; struct usb_hcd *hcd = ohci_to_hcd(ohci); + unsigned long usecs; disable (ohci); @@ -724,7 +725,8 @@ retry: spin_unlock_irq (&ohci->lock); // POTPGT delay is bits 24-31, in 2 ms units. - mdelay ((val >> 23) & 0x1fe); + usecs = ((val >> 23) & 0x1fe) * USEC_PER_MSEC; + usleep_range(usecs, usecs + 1000); hcd->state = HC_STATE_RUNNING; if (quirk_zfmicro(ohci)) {