From 925f5afedb93f7c80958c6bf7ce6cc31542076dc Mon Sep 17 00:00:00 2001 From: Jiri Pirko Date: Thu, 25 Apr 2019 15:59:44 +0200 Subject: netdevsim: put netdevsim bus code into separate file As the code related to netdevsim bus is going to get bigger, move the existing code to a separate file. Signed-off-by: Jiri Pirko Signed-off-by: David S. Miller --- drivers/net/netdevsim/bus.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 drivers/net/netdevsim/bus.c (limited to 'drivers/net/netdevsim/bus.c') diff --git a/drivers/net/netdevsim/bus.c b/drivers/net/netdevsim/bus.c new file mode 100644 index 000000000000..26b866b72afc --- /dev/null +++ b/drivers/net/netdevsim/bus.c @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0 +/* Copyright (C) 2017 Netronome Systems, Inc. + * Copyright (C) 2019 Mellanox Technologies. All rights reserved + */ + +#include + +#include "netdevsim.h" + +struct bus_type nsim_bus = { + .name = DRV_NAME, + .dev_name = DRV_NAME, + .num_vf = nsim_num_vf, +}; + +int nsim_bus_init(void) +{ + return bus_register(&nsim_bus); +} + +void nsim_bus_exit(void) +{ + bus_unregister(&nsim_bus); +} -- cgit v1.2.3-59-g8ed1b