Omap4 sd_card driver: fix recursive usleep loop

This commit removes an endless loop, that occurred when the sd_card driver
called usleep, or msleep on its Timer_delayer object. Fixes #705

Also fixes the same problem for the Omap4 GPIO driver.
This commit is contained in:
Stefan Kalkowski 2013-04-02 13:46:15 +02:00 committed by Norman Feske
parent d339eb734f
commit ba9e7185a8
2 changed files with 2 additions and 24 deletions

View File

@ -51,18 +51,7 @@ class Gpio::Driver
/**
* Implementation of 'Delayer' interface
*/
void usleep(unsigned us)
{
/* polling */
if (us == 0)
return;
unsigned ms = us / 1000;
if (ms == 0)
ms = 1;
Timer::Connection::msleep(ms);
}
void usleep(unsigned us) { Timer::Connection::usleep(us); }
} _delayer;
/* memory map */

View File

@ -38,18 +38,7 @@ class Block::Omap4_driver : public Block::Driver
/**
* Implementation of 'Delayer' interface
*/
void usleep(unsigned us)
{
/* polling */
if (us == 0)
return;
unsigned ms = us / 1000;
if (ms == 0)
ms = 1;
Timer::Connection::msleep(ms);
}
void usleep(unsigned us) { Timer::Connection::usleep(us); }
} _delayer;
/* memory map */