mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
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:
parent
d339eb734f
commit
ba9e7185a8
@ -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 */
|
||||
|
@ -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 */
|
||||
|
Loading…
Reference in New Issue
Block a user