Re: [PATCH rdma-next v2 3/5] IB/umad: Refactor code to use cdev_device_add()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 21, 2018 at 04:19:25PM +0200, Leon Romanovsky wrote:
> @@ -1074,8 +1077,7 @@ static int ib_umad_sm_open(struct inode *inode, struct file *filp)
>  	if (ret)
>  		goto err_clr_sm_cap;
>  
> -	kobject_get(&port->umad_dev->kobj);
> -
> +	ib_umad_dev_get(port->umad_dev);

Now that the cdev is being used properly this refcounting is
redundant. The cdev already holds a kref on the struct device between
open/release, and the struct device now properly chains to the
enclosing struct kref. Lets have a patch to delete it please..

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux