diff options
author | wollman <wollman@FreeBSD.org> | 1994-10-19 01:59:11 +0000 |
---|---|---|
committer | wollman <wollman@FreeBSD.org> | 1994-10-19 01:59:11 +0000 |
commit | 24e218260af83b7292524d1581b8dfcf5d3c8c5b (patch) | |
tree | 5d1fe7fa29fd95ce356cefa187ddba64b0b97b6d /sys/kern/kern_devconf.c | |
parent | c2771d0d1bd4ee9f81f73a838d7aa075897c1b71 (diff) | |
download | FreeBSD-src-24e218260af83b7292524d1581b8dfcf5d3c8c5b.zip FreeBSD-src-24e218260af83b7292524d1581b8dfcf5d3c8c5b.tar.gz |
Add support for devconf to a large number of device drivers, and do
the right thing in dev_goawayall() when kdc_goaway is null.
Diffstat (limited to 'sys/kern/kern_devconf.c')
-rw-r--r-- | sys/kern/kern_devconf.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/kern/kern_devconf.c b/sys/kern/kern_devconf.c index f5e74d8..39f728c 100644 --- a/sys/kern/kern_devconf.c +++ b/sys/kern/kern_devconf.c @@ -73,7 +73,8 @@ dev_detach(struct kern_devconf *kdc) /* * NB: the device must do a dev_detach inside its goaway routine, if it - * succeeds. + * succeeds. If no routine is specified, we assume no special treatment is + * required. */ int dev_goawayall(int force) @@ -82,6 +83,12 @@ dev_goawayall(int force) struct kern_devconf *kdc = dc_list; while(kdc) { + if(!kdc->kdc_goaway) { + dev_detach(kdc); + kdc = dc_list; + continue; + } + if(kdc->kdc_goaway(kdc, force)) { rv++; kdc = kdc->kdc_next; |