RDMA/core: Replace open-coded variant of put_device
authorLeon Romanovsky <leonro@mellanox.com>
Mon, 1 Jan 2018 11:07:13 +0000 (13:07 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Tue, 2 Jan 2018 20:36:57 +0000 (13:36 -0700)
commit924b8900a49df284464db5d97362801f8a2ac7b4
tree059c1aa76bd6f7ed63ccaf4bde810443ba1a989d
parentb823369b6faa33cc71b65eef9bebcefe622913dc
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>
drivers/infiniband/core/device.c