diff options
author | jhb <jhb@FreeBSD.org> | 2015-12-02 18:27:30 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2015-12-02 18:27:30 +0000 |
commit | f4698eb999d128556b2bc7fd99cc91df3cb3530d (patch) | |
tree | d85566747f3ab9fcf2425a68b1bc180e88614717 /sys/sys/conf.h | |
parent | 9b472b7eb57ce751661cf3206c82b995e0ddff9a (diff) | |
download | FreeBSD-src-f4698eb999d128556b2bc7fd99cc91df3cb3530d.zip FreeBSD-src-f4698eb999d128556b2bc7fd99cc91df3cb3530d.tar.gz |
The cdevpriv_dtr_t typedef was not able to be used in a function prototype
like the various d_*_t typedefs since it declared a function pointer rather
than a function. Add a new d_priv_dtor_t typedef that declares the function
and can be used as a function prototype. The previous typedef wasn't
useful outside of the cdevpriv implementation, so retire it.
The name d_priv_dtor_t was chosen to be more consistent with cdev methods
since it is commonly used in place of d_close_t even though it is not a
direct pointer in struct cdevsw.
Reviewed by: kib, imp
MFC after: 1 month
Differential Revision: https://reviews.freebsd.org/D4340
Diffstat (limited to 'sys/sys/conf.h')
-rw-r--r-- | sys/sys/conf.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/sys/conf.h b/sys/sys/conf.h index 4001822..4681acd 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -277,9 +277,9 @@ void setconf(void); #define dev2unit(d) ((d)->si_drv0) -typedef void (*cdevpriv_dtr_t)(void *data); +typedef void d_priv_dtor_t(void *data); int devfs_get_cdevpriv(void **datap); -int devfs_set_cdevpriv(void *priv, cdevpriv_dtr_t dtr); +int devfs_set_cdevpriv(void *priv, d_priv_dtor_t *dtr); void devfs_clear_cdevpriv(void); void devfs_fpdrop(struct file *fp); /* XXX This is not public KPI */ |