Selaa lähdekoodia

RDMA/core: Replace open-coded variant of get_device

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 <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Parav Pandit 7 vuotta sitten
vanhempi
commit
627212c9d4
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      drivers/infiniband/core/sysfs.c

+ 2 - 2
drivers/infiniband/core/sysfs.c

@@ -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);