Staging: comedi: replace for loop with msleep()
authorBill Pemberton <wfp5p@virginia.edu>
Sun, 26 Apr 2009 18:45:11 +0000 (14:45 -0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:34 +0000 (11:00 -0700)
Replace 2 attempts to use a for loop as a sleep with a call to msleep().

Signed-off-by: Bill Pemberton <wfp5p@virginia.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/drivers/addi-data/addi_amcc_S5920.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c

index 556ed46d78a7a3d32e65687e3a685986f06f1723..6e9e7ed4dba989bbd07f52325f8f7509db31eaad 100644 (file)
@@ -180,7 +180,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
                        }
 
                        /* Sleep */
-                       for (i = 0; i < 10000; i++) ;
+                       msleep(1);
 
                }
                w_ReadWord =
index 89d4e21b99540c5c8b5d8cbdc6bb9b6021fb7e57..9b53255bd45be0d3eef2c4afad73152e78e6ba19 100644 (file)
@@ -224,7 +224,7 @@ int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
 
 
                        /* Sleep */
-                       for (i = 0; i < 10000; i++) ;
+                       msleep(1);
 
                }
                w_ReadWord =