Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1765740AbXEVKZg (ORCPT ); Tue, 22 May 2007 06:25:36 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756884AbXEVKZ3 (ORCPT ); Tue, 22 May 2007 06:25:29 -0400 Received: from www.osadl.org ([213.239.205.134]:59313 "EHLO mail.tglx.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756591AbXEVKZ3 (ORCPT ); Tue, 22 May 2007 06:25:29 -0400 Subject: [PATCH] CDROM: replace jiffies busyloop with msleep From: Thomas Gleixner To: LKML Cc: Ingo Molnar , Alan Cox , Jeff Garzik Content-Type: text/plain Date: Tue, 22 May 2007 12:25:25 +0200 Message-Id: <1179829525.12708.118.camel@chaos> Mime-Version: 1.0 X-Mailer: Evolution 2.8.3 (2.8.3-2.fc6) Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1271 Lines: 45 From: Ingo Molnar The SJCD driver uses a jiffies busy loop. Replace it with msleep. Signed-off-by: Ingo Molnar Acked-by: Thomas Gleixner --- drivers/cdrom/sjcd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Index: linux-2.6/drivers/cdrom/sjcd.c =================================================================== --- linux-2.6.orig/drivers/cdrom/sjcd.c +++ linux-2.6/drivers/cdrom/sjcd.c @@ -69,6 +69,7 @@ #include #include #include +#include #include #include @@ -1709,12 +1710,11 @@ static int __init sjcd_init(void) printk(KERN_INFO "SJCD: Resetting: "); sjcd_send_cmd(SCMD_RESET); for (i = 1000; i > 0 && !sjcd_status_valid; --i) { - unsigned long timer; - /* * Wait 10ms approx. */ - for (timer = jiffies; time_before_eq(jiffies, timer);); + msleep(10); + if ((i % 100) == 0) printk("."); (void) sjcd_check_status(); - 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/