mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 18:06:50 +00:00
platform_drv: aquire_single_device return first
* Only acquire and return the first device Fix genodelabs/genode#4614
This commit is contained in:
parent
f25070d441
commit
4b9fb10fdb
@ -153,7 +153,7 @@ Session_component::acquire_single_device()
|
||||
Capability<Platform::Device_interface> cap;
|
||||
|
||||
_devices.for_each([&] (Device & dev) {
|
||||
if (matches(dev) && !dev.owner().valid())
|
||||
if (!cap.valid() && matches(dev) && !dev.owner().valid())
|
||||
cap = _acquire(dev); });
|
||||
|
||||
return cap;
|
||||
|
Loading…
x
Reference in New Issue
Block a user