]> Git Repo - linux.git/commitdiff
RDMA/core: Replace open-coded variant of get_device
authorParav Pandit <[email protected]>
Mon, 3 Sep 2018 17:20:25 +0000 (20:20 +0300)
committerJason Gunthorpe <[email protected]>
Wed, 5 Sep 2018 22:04:52 +0000 (16:04 -0600)
Reuse existing get_device() API to do it symmetric to already used
put_device() in commit 924b8900a49d ("RDMA/core: Replace open-coded
variant of put_device")

Signed-off-by: Parav Pandit <[email protected]>
Signed-off-by: Leon Romanovsky <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
drivers/infiniband/core/sysfs.c

index 7fd14ead7b378ca4d5048e34e800af114d0088d6..62351b3fcafc8290045ae9629016f621a823b021 100644 (file)
@@ -1359,8 +1359,8 @@ void ib_device_unregister_sysfs(struct ib_device *device)
 {
        int i;
 
-       /* Hold kobject until ib_dealloc_device() */
-       kobject_get(&device->dev.kobj);
+       /* Hold device until ib_dealloc_device() */
+       get_device(&device->dev);
 
        free_port_list_attributes(device);
 
This page took 0.061245 seconds and 4 git commands to generate.