X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fmacintosh%2Fadb.c;h=3d2357e50b68274b645d4de359c367bf9a695729;hb=043471a130a8787b4b470bb4400b780bf615b019;hp=b7cc2da372f44345e770504e0156ba6df2b55eb0;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index b7cc2da37..3d2357e50 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c @@ -139,9 +139,10 @@ static void printADBreply(struct adb_request *req) static __inline__ void adb_wait_ms(unsigned int ms) { if (current->pid && adb_probe_task_pid && - adb_probe_task_pid == current->pid) - msleep(ms); - else + adb_probe_task_pid == current->pid) { + set_task_state(current, TASK_UNINTERRUPTIBLE); + schedule_timeout(1 + ms * HZ / 1000); + } else mdelay(ms); } @@ -560,7 +561,7 @@ adb_unregister(int index) write_lock_irq(&adb_handler_lock); } ret = 0; - adb_handler[index].handler = NULL; + adb_handler[index].handler = 0; } write_unlock_irq(&adb_handler_lock); up(&adb_handler_sem);