diff options
| author | Jiri Pirko <jiri@nvidia.com> | 2026-03-12 13:03:56 +0300 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-03-14 23:08:47 +0300 |
| commit | 0f5531879afbf904f19a15b39f687a9ec47a82cc (patch) | |
| tree | 327237e8500ffa5d2ea68bf0c17bf31c38470aea /include/net/devlink.h | |
| parent | 68deca0f0f4bba8c5278340c7c142500171d5f9b (diff) | |
| download | linux-0f5531879afbf904f19a15b39f687a9ec47a82cc.tar.xz | |
devlink: add helpers to get bus_name/dev_name
Introduce devlink_bus_name() and devlink_dev_name() helpers and
convert all direct accesses to devlink->dev->bus->name and
dev_name(devlink->dev) to use them.
This prepares for dev-less devlink instances where these helpers
will be extended to handle the missing device.
Signed-off-by: Jiri Pirko <jiri@nvidia.com>
Link: https://patch.msgid.link/20260312100407.551173-3-jiri@resnulli.us
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, 2 insertions, 0 deletions
diff --git a/include/net/devlink.h b/include/net/devlink.h index cb839e0435a1..0afb0958b910 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1611,6 +1611,8 @@ struct devlink_ops { void *devlink_priv(struct devlink *devlink); struct devlink *priv_to_devlink(void *priv); struct device *devlink_to_dev(const struct devlink *devlink); +const char *devlink_bus_name(const struct devlink *devlink); +const char *devlink_dev_name(const struct devlink *devlink); /* Devlink instance explicit locking */ void devl_lock(struct devlink *devlink); |
