diff options
author | Vincent Mailhol <mailhol.vincent@wanadoo.fr> | 2022-11-29 10:51:38 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2022-12-01 06:49:38 +0100 |
commit | 226bf980550627c88549b112ac6c8fb40873afb4 (patch) | |
tree | dfe0850bb47e635b48f1bac64e81bc548152a969 /include/net/devlink.h | |
parent | dt-bindings: nfc: nxp,nci: Document NQ310 compatible (diff) | |
download | linux-226bf980550627c88549b112ac6c8fb40873afb4.tar.xz linux-226bf980550627c88549b112ac6c8fb40873afb4.zip |
net: devlink: let the core report the driver name instead of the drivers
The driver name is available in device_driver::name. Right now,
drivers still have to report this piece of information themselves in
their devlink_ops::info_get callback function.
In order to factorize code, make devlink_nl_info_fill() add the driver
name attribute.
Now that the core sets the driver name attribute, drivers are not
supposed to call devlink_info_driver_name_put() anymore. Remove
devlink_info_driver_name_put() and clean-up all the drivers using this
function in their callback.
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Tested-by: Ido Schimmel <idosch@nvidia.com> # mlxsw
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/devlink.h')
-rw-r--r-- | include/net/devlink.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index 02528f736f65..5f6eca5e4a40 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1762,8 +1762,6 @@ int devlink_region_snapshot_create(struct devlink_region *region, u8 *data, u32 snapshot_id); int devlink_info_serial_number_put(struct devlink_info_req *req, const char *sn); -int devlink_info_driver_name_put(struct devlink_info_req *req, - const char *name); int devlink_info_board_serial_number_put(struct devlink_info_req *req, const char *bsn); |