mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-04-16 19:07:40 +07:00
RDMA/core: Rename ports_parent to ports_kobj
Normally kobj objects have kobj suffix to reflect it. Rename ports_parent to ports_kobj. Signed-off-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
0f6ef65d1c
commit
1ae4cfa039
@ -1036,7 +1036,7 @@ static int add_port(struct ib_device *device, int port_num,
|
|||||||
p->port_num = port_num;
|
p->port_num = port_num;
|
||||||
|
|
||||||
ret = kobject_init_and_add(&p->kobj, &port_type,
|
ret = kobject_init_and_add(&p->kobj, &port_type,
|
||||||
device->ports_parent,
|
device->ports_kobj,
|
||||||
"%d", port_num);
|
"%d", port_num);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
kfree(p);
|
kfree(p);
|
||||||
@ -1305,7 +1305,7 @@ static void free_port_list_attributes(struct ib_device *device)
|
|||||||
kobject_put(p);
|
kobject_put(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
kobject_put(device->ports_parent);
|
kobject_put(device->ports_kobj);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ib_device_register_sysfs(struct ib_device *device,
|
int ib_device_register_sysfs(struct ib_device *device,
|
||||||
@ -1323,9 +1323,8 @@ int ib_device_register_sysfs(struct ib_device *device,
|
|||||||
if (ret)
|
if (ret)
|
||||||
goto err;
|
goto err;
|
||||||
|
|
||||||
device->ports_parent = kobject_create_and_add("ports",
|
device->ports_kobj = kobject_create_and_add("ports", &class_dev->kobj);
|
||||||
&class_dev->kobj);
|
if (!device->ports_kobj) {
|
||||||
if (!device->ports_parent) {
|
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
goto err_put;
|
goto err_put;
|
||||||
}
|
}
|
||||||
|
@ -2542,7 +2542,7 @@ struct ib_device {
|
|||||||
/* First group for device attributes, NULL terminated array */
|
/* First group for device attributes, NULL terminated array */
|
||||||
const struct attribute_group *groups[2];
|
const struct attribute_group *groups[2];
|
||||||
|
|
||||||
struct kobject *ports_parent;
|
struct kobject *ports_kobj;
|
||||||
struct list_head port_list;
|
struct list_head port_list;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
Loading…
Reference in New Issue
Block a user