From owner-svn-src-head@freebsd.org Mon May 23 17:17:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 270D6B47E62; Mon, 23 May 2016 17:17:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07FAF1520; Mon, 23 May 2016 17:17:26 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 1B449B95B; Mon, 23 May 2016 13:17:25 -0400 (EDT) From: John Baldwin To: Hans Petter Selasky 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 Date: Mon, 23 May 2016 10:00:20 -0700 Message-ID: <3455323.tBydyU5thm@ralph.baldwin.cx> User-Agent: KMail/4.14.3 (FreeBSD/10.2-STABLE; KDE/4.14.3; amd64; ; ) In-Reply-To: <201605231150.u4NBo56Y005227@repo.freebsd.org> References: <201605231150.u4NBo56Y005227@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 23 May 2016 13:17:25 -0400 (EDT) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 17:17:26 -0000 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