]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: Refer to the device kobject instead of ports_parent
authorParav Pandit <parav@mellanox.com>
Sun, 7 Oct 2018 09:12:39 +0000 (12:12 +0300)
committerDoug Ledford <dledford@redhat.com>
Tue, 16 Oct 2018 18:09:44 +0000 (14:09 -0400)
commit1b6efa6a339de9a53827c678aeee6f88b48ad9ad
tree537c6c40cf9a973479a8992a627cbe49fdbf79fb
parenta0f06bcb8b899570b648a89e43ac35b8b233a435
IB/mlx4: Refer to the device kobject instead of ports_parent

iov sysfs tree is created under ib device at
/sys/class/infiniband/mlx4_0/iov.
And,
ibdev->ports_parent->parent = &ibdev->dev.

Therefore, refer to device's kobject directly instead of
indirect access to it.

Additionally, iov entries are created under device kobject and deleted
before device is removed. There is no need to hold additional reference
to device kobject in provider driver.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/hw/mlx4/sysfs.c