From patchwork Fri Feb 21 01:15:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 3693041 Return-Path: X-Original-To: patchwork-linux-spi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 67EE09F1EE for ; Fri, 21 Feb 2014 01:15:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9E99020148 for ; Fri, 21 Feb 2014 01:15:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC40420120 for ; Fri, 21 Feb 2014 01:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752994AbaBUBPY (ORCPT ); Thu, 20 Feb 2014 20:15:24 -0500 Received: from mail-pd0-f170.google.com ([209.85.192.170]:44238 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752394AbaBUBPX (ORCPT ); Thu, 20 Feb 2014 20:15:23 -0500 Received: by mail-pd0-f170.google.com with SMTP id p10so2601682pdj.1 for ; Thu, 20 Feb 2014 17:15:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:subject:from:to:cc:date:content-type :mime-version:content-transfer-encoding; bh=GPH0eEudPEL6L/kP8QRozUVI1Vhjc9nYK379uslyhEQ=; b=DoQT8YX2Tgg2aWTUewltVGP3sAVtaKOxRW51MvBY/14jU7IuR4ewrHya+3SLvoiu4d tK8oVAVSdvOl0SR8Bl6XN/B1OMABfGme1k6KxhjrfdiOMkj+vCIqQftWcmcBtAkZzQCk jNgVGvmmG2icZPf439xKdGU4n/8LzoyeubW4949Nlh1Jh9fmsuRVR7327npmYnZnwaH4 Ke8CEnz1TQSdfEnnBg73x/0mesuajaA6NYm0N4IOPf6iANPJIj3AqrfTTCQmn3juIdtx 02MUPcSUYfEor8kMTWBv4JQ2u+VVN+R6Y6McwS3WCyFAxuQmyZj4TL1tcWAEEbIE8bth L63Q== X-Gm-Message-State: ALoCoQmXtMqUWRqbSOzvsMOuU38NgYydXuyNwAqbTNjyaM+1a5Pek1A756LuhjORywwhqSrbMHP9 X-Received: by 10.66.119.172 with SMTP id kv12mr5803893pab.34.1392945322575; Thu, 20 Feb 2014 17:15:22 -0800 (PST) Received: from [192.168.1.102] (111-240-52-24.dynamic.hinet.net. [111.240.52.24]) by mx.google.com with ESMTPSA id jk16sm15456507pbb.34.2014.02.20.17.15.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Feb 2014 17:15:21 -0800 (PST) Message-ID: <1392945318.4125.5.camel@phoenix> Subject: [PATCH] spi: core: Replace msleep with usleep_range to get more accurate sleep time From: Axel Lin To: Mark Brown Cc: linux-spi@vger.kernel.org Date: Fri, 21 Feb 2014 09:15:18 +0800 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 Sender: linux-spi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-spi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixes below checkpatch warning: WARNING: msleep < 20ms can sleep for up to 20ms; see Documentation/timers/timers-howto.txt + msleep(10); Signed-off-by: Axel Lin --- drivers/spi/spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c index 2b664c8..055580f 100644 --- a/drivers/spi/spi.c +++ b/drivers/spi/spi.c @@ -1078,7 +1078,7 @@ static int spi_stop_queue(struct spi_master *master) */ while ((!list_empty(&master->queue) || master->busy) && limit--) { spin_unlock_irqrestore(&master->queue_lock, flags); - msleep(10); + usleep_range(10000, 11000); spin_lock_irqsave(&master->queue_lock, flags); }