Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/macppc/dev de-__P, remove register, ansify.



details:   https://anonhg.NetBSD.org/src/rev/3e6b08127110
branches:  trunk
changeset: 572698:3e6b08127110
user:      chs <chs%NetBSD.org@localhost>
date:      Mon Jan 10 16:34:46 2005 +0000

description:
de-__P, remove register, ansify.

diffstat:

 sys/arch/macppc/dev/zs.c |  158 +++++++++++++++++-----------------------------
 1 files changed, 60 insertions(+), 98 deletions(-)

diffs (truncated from 384 to 300 lines):

diff -r 70786e6cc995 -r 3e6b08127110 sys/arch/macppc/dev/zs.c
--- a/sys/arch/macppc/dev/zs.c  Mon Jan 10 15:29:50 2005 +0000
+++ b/sys/arch/macppc/dev/zs.c  Mon Jan 10 16:34:46 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs.c,v 1.29 2004/03/24 19:42:04 matt Exp $     */
+/*     $NetBSD: zs.c,v 1.30 2005/01/10 16:34:46 chs Exp $      */
 
 /*
  * Copyright (c) 1996, 1998 Bill Studenmund
@@ -54,7 +54,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.29 2004/03/24 19:42:04 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.30 2005/01/10 16:34:46 chs Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -127,7 +127,7 @@
 /* device to which the console is attached--if serial. */
 /* Mac stuff */
 
-static int zs_get_speed __P((struct zs_chanstate *));
+static int zs_get_speed(struct zs_chanstate *);
 
 /*
  * Even though zsparam will set up the clock multiples, etc., we
@@ -160,35 +160,32 @@
  ****************************************************************/
 
 /* Definition of the driver for autoconfig. */
-static int     zsc_match __P((struct device *, struct cfdata *, void *));
-static void    zsc_attach __P((struct device *, struct device *, void *));
-static int  zsc_print __P((void *, const char *name));
+static int     zsc_match(struct device *, struct cfdata *, void *);
+static void    zsc_attach(struct device *, struct device *, void *);
+static int     zsc_print(void *, const char *);
 
 CFATTACH_DECL(zsc, sizeof(struct zsc_softc),
     zsc_match, zsc_attach, NULL, NULL);
 
 extern struct cfdriver zsc_cd;
 
-int zshard __P((void *));
-int zssoft __P((void *));
+int zshard(void *);
+int zssoft(void *);
 #ifdef ZS_TXDMA
-static int zs_txdma_int __P((void *));
+static int zs_txdma_int(void *);
 #endif
 
-void zscnprobe __P((struct consdev *));
-void zscninit __P((struct consdev *));
-int  zscngetc __P((dev_t));
-void zscnputc __P((dev_t, int));
-void zscnpollc __P((dev_t, int));
+void zscnprobe(struct consdev *);
+void zscninit(struct consdev *);
+int  zscngetc(dev_t);
+void zscnputc(dev_t, int);
+void zscnpollc(dev_t, int);
 
 /*
  * Is the zs chip present?
  */
 static int
-zsc_match(parent, cf, aux)
-       struct device *parent;
-       struct cfdata *cf;
-       void *aux;
+zsc_match(struct device *parent, struct cfdata *cf, void *aux)
 {
        struct confargs *ca = aux;
        int unit = cf->cf_unit;
@@ -209,10 +206,7 @@
  * not set up the keyboard as ttya, etc.
  */
 static void
-zsc_attach(parent, self, aux)
-       struct device *parent;
-       struct device *self;
-       void *aux;
+zsc_attach(struct device *parent, struct device *self, void *aux)
 {
        struct zsc_softc *zsc = (void *)self;
        struct confargs *ca = aux;
@@ -414,9 +408,7 @@
 }
 
 static int
-zsc_print(aux, name)
-       void *aux;
-       const char *name;
+zsc_print(void *aux, const char *name)
 {
        struct zsc_attach_args *args = aux;
 
@@ -430,10 +422,7 @@
 }
 
 int
-zsmdioctl(cs, cmd, data)
-       struct zs_chanstate *cs;
-       u_long cmd;
-       caddr_t data;
+zsmdioctl(struct zs_chanstate *cs, u_long cmd, caddr_t data)
 {
        switch (cmd) {
        default:
@@ -443,8 +432,7 @@
 }
 
 void
-zsmd_setclock(cs)
-       struct zs_chanstate *cs;
+zsmd_setclock(struct zs_chanstate *cs)
 {
 #ifdef NOTYET
        struct xzs_chanstate *xcs = (void *)cs;
@@ -469,11 +457,10 @@
  * so we have to look at all of them on each interrupt.
  */
 int
-zshard(arg)
-       void *arg;
+zshard(void *arg)
 {
-       register struct zsc_softc *zsc;
-       register int unit, rval;
+       struct zsc_softc *zsc;
+       int unit, rval;
 
        rval = 0;
        for (unit = 0; unit < zsc_cd.cd_ndevs; unit++) {
@@ -504,11 +491,10 @@
  * Similar scheme as for zshard (look at all of them)
  */
 int
-zssoft(arg)
-       void *arg;
+zssoft(void *arg)
 {
-       register struct zsc_softc *zsc;
-       register int unit;
+       struct zsc_softc *zsc;
+       int unit;
 
        /* This is not the only ISR on this IPL. */
        if (zssoftpending == 0)
@@ -532,8 +518,7 @@
 
 #ifdef ZS_TXDMA
 int
-zs_txdma_int(arg)
-       void *arg;
+zs_txdma_int(void *arg)
 {
        int ch = (int)arg;
        struct zsc_softc *zsc;
@@ -561,10 +546,7 @@
 }
 
 void
-zs_dma_setup(cs, pa, len)
-       struct zs_chanstate *cs;
-       caddr_t pa;
-       int len;
+zs_dma_setup(struct zs_chanstate *cs, caddr_t pa, int len)
 {
        struct zsc_softc *zsc;
        dbdma_command_t *cmdp;
@@ -590,8 +572,7 @@
  * XXX Assume internal BRG.
  */
 int
-zs_get_speed(cs)
-       struct zs_chanstate *cs;
+zs_get_speed(struct zs_chanstate *cs)
 {
        int tconst;
 
@@ -618,9 +599,7 @@
  * By Bill Studenmund, 1996-05-12
  */
 int
-zs_set_speed(cs, bps)
-       struct zs_chanstate *cs;
-       int bps;        /* bits per second */
+zs_set_speed(struct zs_chanstate *cs, int bps)
 {
        struct xzs_chanstate *xcs = (void *) cs;
        int i, tc, tc0 = 0, tc1, s, sf = 0;
@@ -759,9 +738,7 @@
 }
 
 int
-zs_set_modes(cs, cflag)
-       struct zs_chanstate *cs;
-       int cflag;      /* bits per second */
+zs_set_modes(struct zs_chanstate *cs, int cflag)
 {
        struct xzs_chanstate *xcs = (void*)cs;
        int s;
@@ -846,9 +823,7 @@
 #define        ZS_DELAY()
 
 u_char
-zs_read_reg(cs, reg)
-       struct zs_chanstate *cs;
-       u_char reg;
+zs_read_reg(struct zs_chanstate *cs, u_char reg)
 {
        u_char val;
 
@@ -860,9 +835,7 @@
 }
 
 void
-zs_write_reg(cs, reg, val)
-       struct zs_chanstate *cs;
-       u_char reg, val;
+zs_write_reg(struct zs_chanstate *cs, u_char reg, u_char val)
 {
        out8(cs->cs_reg_csr, reg);
        ZS_DELAY();
@@ -870,10 +843,10 @@
        ZS_DELAY();
 }
 
-u_char zs_read_csr(cs)
-       struct zs_chanstate *cs;
+u_char
+zs_read_csr(struct zs_chanstate *cs)
 {
-       register u_char val;
+       u_char val;
 
        val = in8(cs->cs_reg_csr);
        ZS_DELAY();
@@ -882,28 +855,26 @@
        return val;
 }
 
-void  zs_write_csr(cs, val)
-       struct zs_chanstate *cs;
-       u_char val;
+void
+zs_write_csr(struct zs_chanstate *cs, u_char val)
 {
        /* Note, the csr does not write CTS... */
        out8(cs->cs_reg_csr, val);
        ZS_DELAY();
 }
 
-u_char zs_read_data(cs)
-       struct zs_chanstate *cs;
+u_char
+zs_read_data(struct zs_chanstate *cs)
 {
-       register u_char val;
+       u_char val;
 
        val = in8(cs->cs_reg_data);
        ZS_DELAY();
        return val;
 }
 
-void  zs_write_data(cs, val)
-       struct zs_chanstate *cs;
-       u_char val;
+void
+zs_write_data(struct zs_chanstate *cs, u_char val)
 {
        out8(cs->cs_reg_data, val);
        ZS_DELAY();
@@ -944,11 +915,10 @@
  * Polled input char.
  */
 int
-zs_getc(v)
-       void *v;
+zs_getc(void *v)
 {
-       register volatile struct zschan *zc = v;
-       register int s, c, rr0;
+       volatile struct zschan *zc = v;
+       int s, c, rr0;
 
        s = splhigh();
        /* Wait for a character to arrive. */
@@ -972,13 +942,11 @@
  * Polled output char.
  */
 void
-zs_putc(v, c)
-       void *v;
-       int c;
+zs_putc(void *v, int c)
 {



Home | Main Index | Thread Index | Old Index