aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/core/device.c
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2018-01-01 13:07:13 +0200
committerJason Gunthorpe <jgg@mellanox.com>2018-01-02 13:36:57 -0700
commit924b8900a49df284464db5d97362801f8a2ac7b4 (patch)
tree059c1aa76bd6f7ed63ccaf4bde810443ba1a989d /drivers/infiniband/core/device.c
parentRDMA/netlink: Simplify code of autoload modules (diff)
downloadlinux-dev-924b8900a49df284464db5d97362801f8a2ac7b4.tar.xz
linux-dev-924b8900a49df284464db5d97362801f8a2ac7b4.zip
RDMA/core: Replace open-coded variant of put_device
There is an existing function to decrease reference counter of the device, let's use it. Reviewed-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/core/device.c')
-rw-r--r--drivers/infiniband/core/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/core/device.c b/drivers/infiniband/core/device.c
index 21302e077be1..a8757b5552de 100644
--- a/drivers/infiniband/core/device.c
+++ b/drivers/infiniband/core/device.c
@@ -272,7 +272,7 @@ void ib_dealloc_device(struct ib_device *device)
{
WARN_ON(device->reg_state != IB_DEV_UNREGISTERED &&
device->reg_state != IB_DEV_UNINITIALIZED);
- kobject_put(&device->dev.kobj);
+ put_device(&device->dev);
}
EXPORT_SYMBOL(ib_dealloc_device);