diff options
author | phk <phk@FreeBSD.org> | 2003-03-08 21:32:59 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2003-03-08 21:32:59 +0000 |
commit | 2dfffca0ff9a04153a17ecae4b14d41ae4001b6a (patch) | |
tree | aa51483fba343aeeb6e1a38ed027be9f71d9d439 /sys/isa/fd.c | |
parent | 1664ca4405c0ae8ca2f173edcfe621ce8a5e3bcc (diff) | |
download | FreeBSD-src-2dfffca0ff9a04153a17ecae4b14d41ae4001b6a.zip FreeBSD-src-2dfffca0ff9a04153a17ecae4b14d41ae4001b6a.tar.gz |
Allocate the devstat structure with devstat_new_entry().
Diffstat (limited to 'sys/isa/fd.c')
-rw-r--r-- | sys/isa/fd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/isa/fd.c b/sys/isa/fd.c index bb2cc86..dd0609a 100644 --- a/sys/isa/fd.c +++ b/sys/isa/fd.c @@ -313,7 +313,7 @@ struct fd_data { int options; /* user configurable options, see fdcio.h */ struct callout_handle toffhandle; struct callout_handle tohandle; - struct devstat device_stats; + struct devstat *device_stats; eventhandler_tag clonetag; dev_t masterdev; dev_t clonedevs[NUMDENS - 1]; @@ -1330,7 +1330,7 @@ fd_attach(device_t dev) UID_ROOT, GID_OPERATOR, 0640, "fd%d", fd->fdu); for (i = 0; i < NUMDENS - 1; i++) fd->clonedevs[i] = NODEV; - devstat_add_entry(&fd->device_stats, device_get_name(dev), + fd->device_stats = devstat_new_entry(device_get_name(dev), device_get_unit(dev), 0, DEVSTAT_NO_ORDERED_TAGS, DEVSTAT_TYPE_FLOPPY | DEVSTAT_TYPE_IF_OTHER, DEVSTAT_PRIORITY_FD); @@ -1345,7 +1345,7 @@ fd_detach(device_t dev) fd = device_get_softc(dev); untimeout(fd_turnoff, fd, fd->toffhandle); - devstat_remove_entry(&fd->device_stats); + devstat_remove_entry(fd->device_stats); destroy_dev(fd->masterdev); for (i = 0; i < NUMDENS - 1; i++) if (fd->clonedevs[i] != NODEV) @@ -1724,7 +1724,7 @@ fdstrategy(struct bio *bp) s = splbio(); bioqdisksort(&fdc->head, bp); untimeout(fd_turnoff, fd, fd->toffhandle); /* a good idea */ - devstat_start_transaction(&fd->device_stats); + devstat_start_transaction(fd->device_stats); device_busy(fd->dev); fdstart(fdc); splx(s); @@ -2372,7 +2372,7 @@ fdstate(fdc_p fdc) bp->bio_resid = 0; fdc->bp = NULL; device_unbusy(fd->dev); - biofinish(bp, &fd->device_stats, 0); + biofinish(bp, fd->device_stats, 0); fdc->fd = (fd_p) 0; fdc->fdu = -1; fdc->state = FINDWORK; @@ -2530,7 +2530,7 @@ retrier(struct fdc_data *fdc) fdc->bp = NULL; fdc->fd->skip = 0; device_unbusy(fd->dev); - biofinish(bp, &fdc->fd->device_stats, 0); + biofinish(bp, fdc->fd->device_stats, 0); fdc->state = FINDWORK; fdc->flags |= FDC_NEEDS_RESET; fdc->fd = (fd_p) 0; |