diff options
author | phk <phk@FreeBSD.org> | 1999-05-30 16:53:49 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-05-30 16:53:49 +0000 |
commit | 7e4a9dced9acd97789b37c32063ee7a8aa133f6d (patch) | |
tree | 407469b3581129f6442306683b28d6b54126baad /sys/pci/xrpu.c | |
parent | dfa3967ffa4d84ed0b1691fac89ba3e73b8544e0 (diff) | |
download | FreeBSD-src-7e4a9dced9acd97789b37c32063ee7a8aa133f6d.zip FreeBSD-src-7e4a9dced9acd97789b37c32063ee7a8aa133f6d.tar.gz |
This commit should be a extensive NO-OP:
Reformat and initialize correctly all "struct cdevsw".
Initialize the d_maj and d_bmaj fields.
The d_reset field was not removed, although it is never used.
I used a program to do most of this, so all the files now use the
same consistent format. Please keep it that way.
Vinum and i4b not modified, patches emailed to respective authors.
Diffstat (limited to 'sys/pci/xrpu.c')
-rw-r--r-- | sys/pci/xrpu.c | 33 |
1 files changed, 24 insertions, 9 deletions
diff --git a/sys/pci/xrpu.c b/sys/pci/xrpu.c index 26c9bd5..309deb0 100644 --- a/sys/pci/xrpu.c +++ b/sys/pci/xrpu.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: xrpu.c,v 1.9 1999/04/24 20:14:03 peter Exp $ + * $Id: xrpu.c,v 1.10 1999/05/09 17:07:12 peter Exp $ * * A very simple device driver for PCI cards based on Xilinx 6200 series * FPGA/RPU devices. Current Functionality is to allow you to open and @@ -49,11 +49,26 @@ static d_ioctl_t xrpu_ioctl; static d_mmap_t xrpu_mmap; #define CDEV_MAJOR 100 -static struct cdevsw xrpudevsw = { - xrpu_open, xrpu_close, noread, nowrite, - xrpu_ioctl, nullstop, noreset, nodevtotty, - seltrue, xrpu_mmap, nostrategy, "xrpu", - NULL, -1 +static struct cdevsw xrpu_cdevsw = { + /* open */ xrpu_open, + /* close */ xrpu_close, + /* read */ noread, + /* write */ nowrite, + /* ioctl */ xrpu_ioctl, + /* stop */ nostop, + /* reset */ noreset, + /* devtotty */ nodevtotty, + /* poll */ nopoll, + /* mmap */ xrpu_mmap, + /* strategy */ nostrategy, + /* name */ "xrpu", + /* parms */ noparms, + /* maj */ CDEV_MAJOR, + /* dump */ nodump, + /* psize */ nopsize, + /* flags */ 0, + /* maxio */ 0, + /* bmaj */ -1 }; static MALLOC_DEFINE(M_XRPU, "xrpu", "XRPU related"); @@ -164,7 +179,7 @@ xrpu_ioctl(dev_t dev, u_long cmd, caddr_t arg, int flag, struct proc *pr) && xt->xt_pps[i].xt_addr_clear == 0) continue; #ifdef DEVFS - devfs_add_devswf(&xrpudevsw, (i+1)<<16, DV_CHR, UID_ROOT, GID_WHEEL, + devfs_add_devswf(&xrpu_cdevsw, (i+1)<<16, DV_CHR, UID_ROOT, GID_WHEEL, 0600, "xpps%d", i); #endif sc->pps[i].ppscap = 0; @@ -239,10 +254,10 @@ xrpu_attach (pcici_t tag, int unit) (u_long)sc->physbase, (u_long)sc->virbase); if (!unit) - cdevsw_add(&cdev, &xrpudevsw, NULL); + cdevsw_add(&cdev, &xrpu_cdevsw, NULL); #ifdef DEVFS - devfs_add_devswf(&xrpudevsw, 0, DV_CHR, UID_ROOT, GID_WHEEL, 0600, + devfs_add_devswf(&xrpu_cdevsw, 0, DV_CHR, UID_ROOT, GID_WHEEL, 0600, "xrpu%d", unit); #endif } |