summaryrefslogtreecommitdiffstats
path: root/sys/pci
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-05-30 16:53:49 +0000
committerphk <phk@FreeBSD.org>1999-05-30 16:53:49 +0000
commit7e4a9dced9acd97789b37c32063ee7a8aa133f6d (patch)
tree407469b3581129f6442306683b28d6b54126baad /sys/pci
parentdfa3967ffa4d84ed0b1691fac89ba3e73b8544e0 (diff)
downloadFreeBSD-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')
-rw-r--r--sys/pci/brooktree848.c28
-rw-r--r--sys/pci/meteor.c25
-rw-r--r--sys/pci/pci.c23
-rw-r--r--sys/pci/xrpu.c33
4 files changed, 86 insertions, 23 deletions
diff --git a/sys/pci/brooktree848.c b/sys/pci/brooktree848.c
index 67b2eb2..70d3367 100644
--- a/sys/pci/brooktree848.c
+++ b/sys/pci/brooktree848.c
@@ -1,4 +1,4 @@
-/* $Id: brooktree848.c,v 1.80 1999/05/23 21:40:51 roger Exp $ */
+/* $Id: brooktree848.c,v 1.81 1999/05/25 12:43:40 roger Exp $ */
/* BT848 Driver for Brooktree's Bt848, Bt848A, Bt849A, Bt878, Bt879 based cards.
The Brooktree BT848 Driver driver is based upon Mark Tinguely and
Jim Lowe's driver for the Matrox Meteor PCI card . The
@@ -600,12 +600,26 @@ static d_ioctl_t bktr_ioctl;
static d_mmap_t bktr_mmap;
#define CDEV_MAJOR 92
-static struct cdevsw bktr_cdevsw =
-{
- bktr_open, bktr_close, bktr_read, bktr_write,
- bktr_ioctl, nostop, nullreset, nodevtotty,
- seltrue, bktr_mmap, NULL, "bktr",
- NULL, -1
+static struct cdevsw bktr_cdevsw = {
+ /* open */ bktr_open,
+ /* close */ bktr_close,
+ /* read */ bktr_read,
+ /* write */ bktr_write,
+ /* ioctl */ bktr_ioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ nopoll,
+ /* mmap */ bktr_mmap,
+ /* strategy */ nostrategy,
+ /* name */ "bktr",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ 0,
+ /* maxio */ 0,
+ /* bmaj */ -1
};
#endif /* __FreeBSD__ */
diff --git a/sys/pci/meteor.c b/sys/pci/meteor.c
index 90157d2..ca50c9a 100644
--- a/sys/pci/meteor.c
+++ b/sys/pci/meteor.c
@@ -228,10 +228,27 @@ static d_ioctl_t meteor_ioctl;
static d_mmap_t meteor_mmap;
#define CDEV_MAJOR 67
-static struct cdevsw meteor_cdevsw =
- { meteor_open, meteor_close, meteor_read, meteor_write, /*67*/
- meteor_ioctl, nostop, nullreset, nodevtotty,/* Meteor */
- seltrue, meteor_mmap, NULL, "meteor", NULL, -1 };
+static struct cdevsw meteor_cdevsw = {
+ /* open */ meteor_open,
+ /* close */ meteor_close,
+ /* read */ meteor_read,
+ /* write */ meteor_write,
+ /* ioctl */ meteor_ioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ nopoll,
+ /* mmap */ meteor_mmap,
+ /* strategy */ nostrategy,
+ /* name */ "meteor",
+ /* parms */ noparms,
+ /* maj */ CDEV_MAJOR,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ 0,
+ /* maxio */ 0,
+ /* bmaj */ -1
+};
#endif
static mreg_t saa7116_pci_default[sizeof(struct saa7116_regs)/sizeof(mreg_t)]={
diff --git a/sys/pci/pci.c b/sys/pci/pci.c
index 552e202..bf5e657 100644
--- a/sys/pci/pci.c
+++ b/sys/pci/pci.c
@@ -23,7 +23,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: pci.c,v 1.104 1999/05/20 15:33:31 gallatin Exp $
+ * $Id: pci.c,v 1.105 1999/05/30 10:54:31 dfr Exp $
*
*/
@@ -847,8 +847,25 @@ pci_ioctl(dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p)
#define PCI_CDEV 78
static struct cdevsw pcicdev = {
- pci_open, pci_close, noread, nowrite, pci_ioctl, nostop, noreset,
- nodevtotty, seltrue, nommap, nostrategy, "pci", 0, PCI_CDEV
+ /* open */ pci_open,
+ /* close */ pci_close,
+ /* read */ noread,
+ /* write */ nowrite,
+ /* ioctl */ pci_ioctl,
+ /* stop */ nostop,
+ /* reset */ noreset,
+ /* devtotty */ nodevtotty,
+ /* poll */ nopoll,
+ /* mmap */ nommap,
+ /* strategy */ nostrategy,
+ /* name */ "pci",
+ /* parms */ noparms,
+ /* maj */ PCI_CDEV,
+ /* dump */ nodump,
+ /* psize */ nopsize,
+ /* flags */ 0,
+ /* maxio */ 0,
+ /* bmaj */ -1
};
#ifdef DEVFS
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
}
OpenPOWER on IntegriCloud