From: Jason Gunthorpe Date: Wed, 5 Sep 2018 22:21:22 +0000 (-0600) Subject: Merge branch 'uverbs_dev_cleanups' into rdma.git for-next X-Git-Tag: v4.20-rc1~110^2~208 X-Git-Url: https://repo.jachan.dev/linux.git/commitdiff_plain/2c910cb75e1fe6de52d95c8e32caedd1629a33a5 Merge branch 'uverbs_dev_cleanups' into rdma.git for-next For dependencies, branch based on rdma.git 'for-rc' of https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git/ Pull 'uverbs_dev_cleanups' from Leon Romanovsky: ==================== Reuse the char device code interfaces to simplify ib_uverbs_device creation and destruction. As part of this series, we are sending fix to cleanup path, which was discovered during internal review, The fix definitely can go to -rc, but it means that this series will be dependent on rdma-rc. ==================== * branch 'uverbs_dev_cleanups': RDMA/uverbs: Use device.groups to initialize device attributes RDMA/uverbs: Use cdev_device_add() instead of cdev_add() RDMA/core: Depend on device_add() to add device attributes RDMA/uverbs: Fix error cleanup path of ib_uverbs_add_one() Resolved conflict in ib_device_unregister_sysfs() Signed-off-by: Jason Gunthorpe --- 2c910cb75e1fe6de52d95c8e32caedd1629a33a5 diff --cc drivers/infiniband/core/sysfs.c index 62351b3fcafc,185075af3ad6..0b04dbff884f --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@@ -1357,10 -1355,8 +1355,8 @@@ err 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);