1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 3 #include "funeth.h" 4 #include "funeth_devlink.h" 5 fun_dl_info_get(struct devlink * dl,struct devlink_info_req * req,struct netlink_ext_ack * extack)6static 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 fun_devlink_alloc(struct device * dev)16struct devlink *fun_devlink_alloc(struct device *dev) 17 { 18 return devlink_alloc(&fun_dl_ops, sizeof(struct fun_ethdev), dev); 19 } 20 fun_devlink_free(struct devlink * devlink)21void fun_devlink_free(struct devlink *devlink) 22 { 23 devlink_free(devlink); 24 } 25 fun_devlink_register(struct devlink * devlink)26void fun_devlink_register(struct devlink *devlink) 27 { 28 devlink_register(devlink); 29 } 30 fun_devlink_unregister(struct devlink * devlink)31void fun_devlink_unregister(struct devlink *devlink) 32 { 33 devlink_unregister(devlink); 34 } 35