From 296c4c267b0151e08a6f68d1be58970a384064e4 Mon Sep 17 00:00:00 2001 From: Mikael Olsson Date: Tue, 16 Jan 2024 10:51:11 +0100 Subject: Remove designated initializer usage in remoteproc Designated initializer is not part of the C++ standard until C++20 and requires a compiler extension to work in earlier versions. To ensure the message_handler_openamp can be compiled with compilers without this extension the usage has been removed. Change-Id: I97c90df6691302cc470b8538f515a1b1ceb385b9 Signed-off-by: Mikael Olsson --- applications/message_handler_openamp/remoteproc.cpp | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/applications/message_handler_openamp/remoteproc.cpp b/applications/message_handler_openamp/remoteproc.cpp index 8fda69b..ed6f7d0 100644 --- a/applications/message_handler_openamp/remoteproc.cpp +++ b/applications/message_handler_openamp/remoteproc.cpp @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: Copyright 2022-2023 Arm Limited and/or its affiliates + * SPDX-FileCopyrightText: Copyright 2022-2024 Arm Limited and/or its affiliates * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the License); you may @@ -44,20 +44,11 @@ void setupRProcMem(remoteproc &rproc, *****************************************************************************/ RProc::RProc(Mailbox::Mailbox &_mailbox, resource_table &table, size_t tableSize) : - mailbox(_mailbox), - ops{ - .init = init, // initialize the remoteproc instance - .remove = remove, // remove the remoteproc instance - .mmap = nullptr, // memory mapped the memory with physical address as input - .handle_rsc = handle_rsc, // handle the vendor specific resource - .config = nullptr, // configure the remoteproc to make it ready to load and run executable - .start = nullptr, // kick the remoteproc to run application - .stop = nullptr, // stop the remoteproc from running application, the resource such as memory may not be off. - .shutdown = nullptr, // shutdown the remoteproc and release its resources. - .notify = notify, // notify the remote - .get_mem = nullptr, // get remoteproc memory I/O region. - }, - vdev(nullptr), mems(), regions(), notifySemaphore(xSemaphoreCreateBinary()) { + mailbox(_mailbox), ops({}), vdev(nullptr), mems(), regions(), notifySemaphore(xSemaphoreCreateBinary()) { + ops.init = init; // initialize the remoteproc instance + ops.remove = remove; // remove the remoteproc instance + ops.handle_rsc = handle_rsc; // handle the vendor specific resource + ops.notify = notify; // notify the remote mailbox.registerCallback(mailboxCallback, static_cast(this)); if (!remoteproc_init(&rproc, &ops, this)) { -- cgit v1.2.1