X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fbluetooth%2Fbluecard_cs.c;h=4e146b366845254cdd56ef1854a7251116ae37e6;hb=90ad8654ffeb336af8c878fdf7bc72e2ac72467a;hp=54ef5f941eb971d365e1e50ca7815ea92283a66c;hpb=a91482bdcc2e0f6035702e46f1b99043a0893346;p=linux-2.6.git diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c index 54ef5f941..4e146b366 100644 --- a/drivers/bluetooth/bluecard_cs.c +++ b/drivers/bluetooth/bluecard_cs.c @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -777,7 +776,8 @@ int bluecard_open(bluecard_info_t *info) outb(0x80, iobase + 0x30); /* Wait some time */ - msleep(10); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout(HZ / 100); /* Turn FPGA on */ outb(0x00, iobase + 0x30); @@ -823,7 +823,8 @@ int bluecard_open(bluecard_info_t *info) outb((0x0f << RTS_LEVEL_SHIFT_BITS) | 1, iobase + REG_RX_CONTROL); /* Timeout before it is safe to send the first HCI packet */ - msleep(1250); + set_current_state(TASK_INTERRUPTIBLE); + schedule_timeout((HZ * 5) / 4); // or set it to 3/2 /* Register HCI device */ if (hci_register_dev(hdev) < 0) {