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