From 3c57a8b3c2915ed2b0a84ac7bb159fa5a04e8263 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20S=C3=B6ntgen?= Date: Mon, 13 Feb 2017 14:55:37 +0100 Subject: [PATCH] usb_session: pass Region_map explicitly Issue #2280. --- repos/dde_linux/src/lib/usb/raw/raw.cc | 10 ++++++---- repos/os/include/usb_session/rpc_object.h | 7 ++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/repos/dde_linux/src/lib/usb/raw/raw.cc b/repos/dde_linux/src/lib/usb/raw/raw.cc index daa0aa3e7e..341617fef8 100644 --- a/repos/dde_linux/src/lib/usb/raw/raw.cc +++ b/repos/dde_linux/src/lib/usb/raw/raw.cc @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2014-2016 Genode Labs GmbH + * Copyright (C) 2014-2017 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU General Public License version 2. @@ -552,10 +552,12 @@ class Usb::Session_component : public Session_rpc_object, DEVICE_REMOVE, }; - Session_component(Genode::Ram_dataspace_capability tx_ds, Genode::Entrypoint &ep, + Session_component(Genode::Ram_dataspace_capability tx_ds, + Genode::Entrypoint &ep, + Genode::Region_map &rm, unsigned long vendor, unsigned long product, long bus, long dev) - : Session_rpc_object(tx_ds, ep.rpc_ep()), + : Session_rpc_object(tx_ds, ep.rpc_ep(), rm), _ep(ep), _vendor(vendor), _product(product), _bus(bus), _dev(dev), _packet_avail(ep, *this, &Session_component::_receive), @@ -818,7 +820,7 @@ class Usb::Root : public Genode::Root_component Ram_dataspace_capability tx_ds = _env.ram().alloc(tx_buf_size); Session_component *session = new (md_alloc()) - Session_component(tx_ds, _env.ep(), vendor, product, bus, dev); + Session_component(tx_ds, _env.ep(), _env.rm(), vendor, product, bus, dev); ::Session::list()->insert(session); return session; } catch (Genode::Session_policy::No_policy_defined) { diff --git a/repos/os/include/usb_session/rpc_object.h b/repos/os/include/usb_session/rpc_object.h index 65608f2308..95f15dbd8f 100644 --- a/repos/os/include/usb_session/rpc_object.h +++ b/repos/os/include/usb_session/rpc_object.h @@ -5,7 +5,7 @@ */ /* - * Copyright (C) 2014 Genode Labs GmbH + * Copyright (C) 2014-2017 Genode Labs GmbH * * This file is part of the Genode OS framework, which is distributed * under the terms of the GNU General Public License version 2. @@ -36,8 +36,9 @@ class Usb::Session_rpc_object : public Genode::Rpc_objectrm_session(), ep) { } + Genode::Rpc_entrypoint &ep, + Genode::Region_map &rm) + : _tx(tx_ds, rm, ep) { } /** * Return capability to packet-stream channel