Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 May 2016 10:00:20 -0700
From:      John Baldwin <jhb@freebsd.org>
To:        Hans Petter Selasky <hselasky@freebsd.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r300493 - head/sys/compat/linuxkpi/common/include/linux
Message-ID:  <3455323.tBydyU5thm@ralph.baldwin.cx>
In-Reply-To: <201605231150.u4NBo56Y005227@repo.freebsd.org>
References:  <201605231150.u4NBo56Y005227@repo.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday, May 23, 2016 11:50:05 AM Hans Petter Selasky wrote:
> Author: hselasky
> Date: Mon May 23 11:50:05 2016
> New Revision: 300493
> URL: https://svnweb.freebsd.org/changeset/base/300493
> 
> Log:
>   Add support for "cdev_add_ext()" to the LinuxKPI.
>   
>   Obtained from:	kmacy @
>   MFC after:	1 week
>   Sponsored by:	Mellanox Technologies
> 
> Modified:
>   head/sys/compat/linuxkpi/common/include/linux/cdev.h
> 
> Modified: head/sys/compat/linuxkpi/common/include/linux/cdev.h
> ==============================================================================
> --- head/sys/compat/linuxkpi/common/include/linux/cdev.h	Mon May 23 11:47:54 2016	(r300492)
> +++ head/sys/compat/linuxkpi/common/include/linux/cdev.h	Mon May 23 11:50:05 2016	(r300493)
> @@ -91,6 +91,18 @@ cdev_add(struct linux_cdev *cdev, dev_t 
>  	return (0);
>  }
>  
> +static inline int
> +cdev_add_ext(struct linux_cdev *cdev, dev_t dev, uid_t uid, gid_t gid, int mode)
> +{
> +	cdev->cdev = make_dev(&linuxcdevsw, MINOR(dev), uid, gid, mode, 
> +	    "%s/%d", kobject_name(&cdev->kobj), MINOR(dev));
> +	cdev->dev = dev;
> +	cdev->cdev->si_drv1 = cdev;
> +
> +	kobject_get(cdev->kobj.parent);
> +	return (0);

This should use make_dev_s() instead?

-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3455323.tBydyU5thm>