1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
2 
3 #include "funeth.h"
4 #include "funeth_devlink.h"
5 
6 static int fun_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
7 			   struct netlink_ext_ack *extack)
8 {
9 	return devlink_info_driver_name_put(req, KBUILD_MODNAME);
10 }
11 
12 static const struct devlink_ops fun_dl_ops = {
13 	.info_get = fun_dl_info_get,
14 };
15 
16 struct devlink *fun_devlink_alloc(struct device *dev)
17 {
18 	return devlink_alloc(&fun_dl_ops, sizeof(struct fun_ethdev), dev);
19 }
20 
21 void fun_devlink_free(struct devlink *devlink)
22 {
23 	devlink_free(devlink);
24 }
25 
26 void fun_devlink_register(struct devlink *devlink)
27 {
28 	devlink_register(devlink);
29 }
30 
31 void fun_devlink_unregister(struct devlink *devlink)
32 {
33 	devlink_unregister(devlink);
34 }
35