summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/wt.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1996-07-23 21:52:43 +0000
committerphk <phk@FreeBSD.org>1996-07-23 21:52:43 +0000
commit507c8709748944c310d7a558ec0e27130fadb6f4 (patch)
treeb7107b6c401f05c3026e9bfb11ea285a7b376aba /sys/i386/isa/wt.c
parentb27f4b2c811818ccd3f03bd1aad99a231b5b2b18 (diff)
downloadFreeBSD-src-507c8709748944c310d7a558ec0e27130fadb6f4.zip
FreeBSD-src-507c8709748944c310d7a558ec0e27130fadb6f4.tar.gz
Make a "DWIM" function for adding [bc]devsw entries for bdev drivers.
Saves about 280 butes of source per driver, 56 bytes in object size and another 56 bytes moves from data to bss. No functional change intended nor expected. GENERIC should be about one k smaller now :-)
Diffstat (limited to 'sys/i386/isa/wt.c')
-rw-r--r--sys/i386/isa/wt.c17
1 files changed, 3 insertions, 14 deletions
diff --git a/sys/i386/isa/wt.c b/sys/i386/isa/wt.c
index dc4e6c9..2b4c792 100644
--- a/sys/i386/isa/wt.c
+++ b/sys/i386/isa/wt.c
@@ -20,7 +20,7 @@
* the original CMU copyright notice.
*
* Version 1.3, Thu Nov 11 12:09:13 MSK 1993
- * $Id: wt.c,v 1.31 1996/03/28 14:28:55 scrappy Exp $
+ * $Id: wt.c,v 1.32 1996/04/08 19:40:57 smpatel Exp $
*
*/
@@ -208,18 +208,11 @@ static d_strategy_t wtstrategy;
#define CDEV_MAJOR 10
#define BDEV_MAJOR 3
-extern struct cdevsw wt_cdevsw;
+static struct cdevsw wt_cdevsw;
static struct bdevsw wt_bdevsw =
{ wtopen, wtclose, wtstrategy, wtioctl, /*3*/
wtdump, wtsize, B_TAPE, "wt", &wt_cdevsw, -1 };
-static struct cdevsw wt_cdevsw =
- { wtopen, wtclose, rawread, rawwrite, /*10*/
- wtioctl, nostop, nullreset, nodevtotty,/* wt */
- seltrue, nommap, wtstrategy, "wt",
- &wt_bdevsw, -1 };
-
-
static inline void
wt_registerdev(struct isa_device *id)
{
@@ -1017,13 +1010,9 @@ static wt_devsw_installed = 0;
static void
wt_drvinit(void *unused)
{
- dev_t dev;
if( ! wt_devsw_installed ) {
- dev = makedev(CDEV_MAJOR, 0);
- cdevsw_add(&dev,&wt_cdevsw, NULL);
- dev = makedev(BDEV_MAJOR, 0);
- bdevsw_add(&dev,&wt_bdevsw, NULL);
+ bdevsw_add_generic(BDEV_MAJOR,CDEV_MAJOR, &wt_bdevsw);
wt_devsw_installed = 1;
}
}
OpenPOWER on IntegriCloud