mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-19 00:27:21 +00:00
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:
parent
901bff813d
commit
2380fc442f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user