-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
- Loading branch information
Jiri Pirko
authored and
David S. Miller
committed
Apr 26, 2019
1 parent
8fb4bc6
commit 925f5af
Showing
4 changed files
with
38 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <linux/device.h> | ||
|
||
#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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters