diff options
author | ed <ed@FreeBSD.org> | 2010-06-17 08:49:31 +0000 |
---|---|---|
committer | ed <ed@FreeBSD.org> | 2010-06-17 08:49:31 +0000 |
commit | 70171ee94e167f43cca27a9c511c13d625606628 (patch) | |
tree | 2324e65bed9956a3e666c8f5cd61bd888caa0034 | |
parent | ef78a755d618239483b4cc9731b42b3317be77e1 (diff) | |
download | FreeBSD-src-70171ee94e167f43cca27a9c511c13d625606628.zip FreeBSD-src-70171ee94e167f43cca27a9c511c13d625606628.tar.gz |
Remove the unit argument from the recently added make_dev_p().
New code that creates character devices shouldn't use device unit
numbers, but only si_drv[12] to hold pointer to per-device data. Make
this function more future proof by removing the unit number argument.
Discussed with: kib
-rw-r--r-- | sys/kern/kern_conf.c | 4 | ||||
-rw-r--r-- | sys/sys/conf.h | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/kern/kern_conf.c b/sys/kern/kern_conf.c index 2470c98..7e4e677 100644 --- a/sys/kern/kern_conf.c +++ b/sys/kern/kern_conf.c @@ -766,14 +766,14 @@ make_dev_credf(int flags, struct cdevsw *devsw, int unit, struct ucred *cr, } int -make_dev_p(int flags, struct cdev **cdev, struct cdevsw *devsw, int unit, +make_dev_p(int flags, struct cdev **cdev, struct cdevsw *devsw, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt, ...) { va_list ap; int res; va_start(ap, fmt); - res = make_dev_credv(flags, cdev, devsw, unit, cr, uid, gid, mode, + res = make_dev_credv(flags, cdev, devsw, 0, cr, uid, gid, mode, fmt, ap); va_end(ap); diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 1039aea..82ea088 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -271,8 +271,8 @@ struct cdev *make_dev_credf(int _flags, struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, const char *_fmt, ...) __printflike(8, 9); int make_dev_p(int _flags, struct cdev **_cdev, struct cdevsw *_devsw, - int _unit, struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, - const char *_fmt, ...) __printflike(9, 10); + struct ucred *_cr, uid_t _uid, gid_t _gid, int _mode, + const char *_fmt, ...) __printflike(8, 9); struct cdev *make_dev_alias(struct cdev *_pdev, const char *_fmt, ...) __printflike(2, 3); void dev_lock(void); |