summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/fungible/funeth/funeth_devlink.c
blob: d50c222948b47f997cfd325e35a730b0d11b1cc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)

#include "funeth.h"
#include "funeth_devlink.h"

static int fun_dl_info_get(struct devlink *dl, struct devlink_info_req *req,
			   struct netlink_ext_ack *extack)
{
	return devlink_info_driver_name_put(req, KBUILD_MODNAME);
}

static const struct devlink_ops fun_dl_ops = {
	.info_get = fun_dl_info_get,
};

struct devlink *fun_devlink_alloc(struct device *dev)
{
	return devlink_alloc(&fun_dl_ops, sizeof(struct fun_ethdev), dev);
}

void fun_devlink_free(struct devlink *devlink)
{
	devlink_free(devlink);
}

void fun_devlink_register(struct devlink *devlink)
{
	devlink_register(devlink);
}

void fun_devlink_unregister(struct devlink *devlink)
{
	devlink_unregister(devlink);
}