mtd/include/linux/mtd cfi.h,1.49,1.50

David Woodhouse dwmw2 at infradead.org
Sat Nov 20 07:46:54 EST 2004


Update of /home/cvs/mtd/include/linux/mtd
In directory phoenix.infradead.org:/tmp/cvs-serv18131

Modified Files:
	cfi.h 
Log Message:
Fix cfi_udelay() to use msleep()


Index: cfi.h
===================================================================
RCS file: /home/cvs/mtd/include/linux/mtd/cfi.h,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- cfi.h	15 Nov 2004 20:56:32 -0000	1.49
+++ cfi.h	20 Nov 2004 12:46:51 -0000	1.50
@@ -349,14 +349,12 @@
 
 static inline void cfi_udelay(int us)
 {
-	unsigned long t = us * HZ / 1000000;
-	if (t) {
-		set_current_state(TASK_UNINTERRUPTIBLE);
-		schedule_timeout(t);
-		return;
+	if (us >= 1000) {
+		msleep((us+999)/1000);
+	} else {
+		udelay(us);
+		cond_resched();
 	}
-	udelay(us);
-	cond_resched();
 }
 
 static inline void cfi_spin_lock(spinlock_t *mutex)





More information about the linux-mtd-cvs mailing list