use new msleep() in ADT746x driver
A message that is not in the archive (sent off-list or not yet received): [email protected]
drivers/macintosh/therm_adt746x.c line 249
Quoted 10 lines · Linux Kernel Mailing List
diff -Nru
a/drivers/macintosh/therm_adt746x.cb/drivers/macintosh/therm_adt746x.cdrivers/macintosh/therm_adt746x.c +1
-2@@ -246,8 +246,7 @@while (monitor_running) { -set_task_state (current,TASK_UNINTERRUPTIBLE ); -schedule_timeout (2 *HZ ); +msleep (2000 );
IMO this is moving the code away from what the coder appeared to intend.
A "sleep(2)" would be preferred, and more clear.
Jeff
Quoted 15 lines · Jeff Garzik
drivers/macintosh/therm_adt746x.c line 249
Quoted 10 lines · Linux Kernel Mailing List
diff -Nru
a/drivers/macintosh/therm_adt746x.cb/drivers/macintosh/therm_adt746x.cdrivers/macintosh/therm_adt746x.c +1
-2@@ -246,8 +246,7 @@while (monitor_running) { -set_task_state (current,TASK_UNINTERRUPTIBLE ); -schedule_timeout (2 *HZ ); +msleep (2000 );IMO this is moving the code away from what the coder appeared to intend.
Quoted 1 line
A "sleep(2)" would be preferred, and more clear.
This patch was done by the original author of the driver
Ben.
Quoted 18 lines · Benjamin Herrenschmidt
Quoted 16 lines · Jeff Garzik
drivers/macintosh/therm_adt746x.c line 249
Quoted 10 lines · Linux Kernel Mailing List
diff -Nru
a/drivers/macintosh/therm_adt746x.cb/drivers/macintosh/therm_adt746x.cdrivers/macintosh/therm_adt746x.c +1
-2@@ -246,8 +246,7 @@while (monitor_running) { -set_task_state (current,TASK_UNINTERRUPTIBLE ); -schedule_timeout (2 *HZ ); +msleep (2000 );IMO this is moving the code away from what the coder appeared to intend.
Quoted 4 lines
Quoted 1 line
A "sleep(2)" would be preferred, and more clear.
This patch was done by the original author of the driver
Well, I think the author is making his driver less readable... "2 seconds" is more clear than "2000 msec", and I am willing to bet that sleep() would have been used, had it existed.
Jeff