Skip to content

Commit

Permalink
modules/mqnic: devlink info_get was added in kernel 5.1
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Forencich <alex@alexforencich.com>
  • Loading branch information
alexforencich committed Apr 11, 2024
1 parent 1ac71de commit 22f4ed6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modules/mqnic/mqnic_devlink.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <linux/version.h>

#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
static int mqnic_devlink_info_get(struct devlink *devlink,
struct devlink_info_req *req, struct netlink_ext_ack *extack)
{
Expand Down Expand Up @@ -83,9 +84,12 @@ static int mqnic_devlink_info_get(struct devlink *devlink,

return 0;
}
#endif

static const struct devlink_ops mqnic_devlink_ops = {
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 1, 0)
.info_get = mqnic_devlink_info_get,
#endif
};

struct devlink *mqnic_devlink_alloc(struct device *dev)
Expand Down

0 comments on commit 22f4ed6

Please sign in to comment.