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