From 8fa802815d2bfbcbf9c1f29e9d261880d8f598fc Mon Sep 17 00:00:00 2001 From: Alexander Boettcher Date: Tue, 12 May 2015 15:35:19 +0200 Subject: [PATCH] pci: fix wrong warning about multiple usage Issue #1487 --- repos/os/src/drivers/pci/pci_session_component.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/repos/os/src/drivers/pci/pci_session_component.h b/repos/os/src/drivers/pci/pci_session_component.h index aaf66c2be1..e0b24adec9 100644 --- a/repos/os/src/drivers/pci/pci_session_component.h +++ b/repos/os/src/drivers/pci/pci_session_component.h @@ -503,6 +503,9 @@ namespace Pci { * device and return its capability. */ try { + Device_component * dev = new (_device_slab) Device_component(config, config_space, _ep, this, + !Genode::strcmp(_label.string(), "acpi_drv")); + /* if more than one driver uses the device - warn about */ if (bdf_in_use.get(Device_config::MAX_BUSES * bus + Device_config::MAX_DEVICES * device + @@ -515,8 +518,6 @@ namespace Pci { Device_config::MAX_DEVICES * device + function, 1); - Device_component * dev = new (_device_slab) Device_component(config, config_space, _ep, this, - !Genode::strcmp(_label.string(), "acpi_drv")); _device_list.insert(dev); return _ep->manage(dev); } catch (Genode::Allocator::Out_of_memory) {