ahci: avoid to reinstantiate backend driver

Instead of fixing the missing dynamic facilities of the AHCI driver
backends for x86 and Exynos5, just avoid to create/destroy the backend
for every new connection, but always use one and the same object.
The AHCI drivers need to be re-written anyway, see issue #1352 for instance,
we can make it more robust for the dynamic case then.

Fixes #786
Fixes #1133
This commit is contained in:
Stefan Kalkowski 2015-01-12 11:17:40 +01:00 committed by Christian Helmuth
parent 901bff813d
commit 2380fc442f
1 changed files with 3 additions and 3 deletions

View File

@ -33,10 +33,10 @@ struct Main
struct Factory : Block::Driver_factory
{
Block::Driver *create() {
return new(env()->heap()) Ahci_driver(); }
static Ahci_driver driver;
return &driver; }
void destroy(Block::Driver *driver) {
Genode::destroy(env()->heap(), static_cast<Ahci_driver *>(driver)); }
void destroy(Block::Driver *driver) { }
} factory;
Block::Root root;