Branch data Line data Source code
1 : : /* SPDX-License-Identifier: BSD-3-Clause 2 : : * Copyright (C) 2022 Intel Corporation. 3 : : * All rights reserved. 4 : : */ 5 : : 6 : : #include "spdk/stdinc.h" 7 : : #include "spdk/vfu_target.h" 8 : : 9 : : #include "spdk_internal/init.h" 10 : : 11 : : static void 12 : 33 : vfu_subsystem_init_done(int rc) 13 : : { 14 : 33 : spdk_subsystem_init_next(rc); 15 : 33 : } 16 : : 17 : : static void 18 : 33 : vfu_target_subsystem_init(void) 19 : : { 20 : 33 : spdk_vfu_init(vfu_subsystem_init_done); 21 : 33 : } 22 : : 23 : : static void 24 : 33 : vfu_target_subsystem_fini_done(void) 25 : : { 26 : 33 : spdk_subsystem_fini_next(); 27 : 33 : } 28 : : 29 : : static void 30 : 33 : vfu_target_subsystem_fini(void) 31 : : { 32 : 33 : spdk_vfu_fini(vfu_target_subsystem_fini_done); 33 : 33 : } 34 : : 35 : : static struct spdk_subsystem g_spdk_subsystem_vfu_target = { 36 : : .name = "vfio_user_target", 37 : : .init = vfu_target_subsystem_init, 38 : : .fini = vfu_target_subsystem_fini, 39 : : }; 40 : : 41 : 37 : SPDK_SUBSYSTEM_REGISTER(g_spdk_subsystem_vfu_target);