]> asedeno.scripts.mit.edu Git - linux.git/commit
RDMA/core: Use simpler device_del() instead of device_unregister()
authorParav Pandit <parav@mellanox.com>
Wed, 13 Feb 2019 17:23:03 +0000 (19:23 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Sat, 16 Feb 2019 04:42:02 +0000 (21:42 -0700)
commite155755e53804e721c8ce99474cc9c65eb8e8bc2
tree871d2204600ebcb8299ee10cc95bce81ac03d156
parentcfe876d8e6b0491170d44c8040c518b121957104
RDMA/core: Use simpler device_del() instead of device_unregister()

Instead of holding extra reference using get_device() that
device_unregister() releases, simplify it as below.

device_add() balances with device_del().  device_initialize() balances
with put_device(), always via ib_dealloc_device().

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/core/device.c
drivers/infiniband/core/sysfs.c