From: Leon Romanovsky Date: Mon, 1 Jan 2018 11:07:13 +0000 (+0200) Subject: RDMA/core: Replace open-coded variant of put_device X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=924b8900a49df284464db5d97362801f8a2ac7b4;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- 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);