bug-hurd
[Top][All Lists]
Advanced

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

[PATCH 23/68] i386/i386at/autoconf.c, com.c, lpr.c: remove forward decla


From: Marin Ramesa
Subject: [PATCH 23/68] i386/i386at/autoconf.c, com.c, lpr.c: remove forward declarations
Date: Fri, 29 Nov 2013 22:53:48 +0100

* i386/i386/autoconf.c (comintr, lprintr): Remove forward declarations.
Include i386at/com.h.
Include i386at/lprreg.h.
* i386/i386at/com.c (comprobe, commctl, comstart, comstop, comattach, comintr, 
comgetstat, comsetstat): Remove forward declarations.
* i386/i386at/com.h: Include device/tty.h.
(comprobe, commctl, comstart, comstop, comattach, comintr, comgetstat, 
comsetstat): Add prototypes.
* i386/i386at/lpr.c (lprprobe, lprstop, lprintr, lprstart, lprattach, 
lprgetstat, lprsetstat, lprpr_addr): Remove forward declarations.
(lprprobe): Fix argument list.
(lprpr): Define argument type.
lprpr_addr): Likewise.
* i386/i386at/lprreg.h (lprprobe, lprstop, lprintr, lprstart, lprattach, 
lprgetstat, lprsetstat, lprpr_addr): Add prototypes.

---
 i386/i386at/autoconf.c |  4 ++--
 i386/i386at/com.c      |  4 ----
 i386/i386at/com.h      | 22 ++++++++++++++++++++++
 i386/i386at/lpr.c      | 14 +++-----------
 i386/i386at/lprreg.h   | 22 ++++++++++++++++++++++
 5 files changed, 49 insertions(+), 17 deletions(-)

diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c
index 66493b0..de1cdc4 100644
--- a/i386/i386at/autoconf.c
+++ b/i386/i386at/autoconf.c
@@ -38,12 +38,12 @@
 
 #if NCOM > 0
 extern struct  bus_driver      comdriver;
-extern void                    comintr();
+#include <i386at/com.h>
 #endif /* NCOM */
 
 #if NLPR > 0
 extern struct  bus_driver      lprdriver;
-extern void                    lprintr();
+#include <i386at/lprreg.h>
 #endif /* NLPR */
 
 struct bus_ctlr        bus_master_init[] = {
diff --git a/i386/i386at/com.c b/i386/i386at/com.c
index 90e1d0b..7b184e3 100644
--- a/i386/i386at/com.c
+++ b/i386/i386at/com.c
@@ -49,11 +49,7 @@
 
 #include <device/cons.h>
 
-int comprobe(), commctl();
-void comstart(struct tty *);
-void comstop(), comattach(), comintr();
 static void comparam();
-int comgetstat(), comsetstat();
 
 static vm_offset_t com_std[NCOM] = { 0 };
 struct bus_device *cominfo[NCOM];
diff --git a/i386/i386at/com.h b/i386/i386at/com.h
index 49f23ee..7d5ee5e 100644
--- a/i386/i386at/com.h
+++ b/i386/i386at/com.h
@@ -28,6 +28,7 @@
 
 #include <mach/std_types.h>
 #include <device/cons.h>
+#include <device/tty.h>
 
 /*
  * Set receive modem state from modem status register.
@@ -47,5 +48,26 @@ extern int comcnprobe(struct consdev *cp);
 extern int comcninit(struct consdev *cp);
 extern int comcngetc(dev_t dev, int wait);
 extern int comcnputc(dev_t dev, int c);
+extern void comintr(int unit);
+
+int comprobe(int port, struct bus_device *dev);
+int commctl(struct tty *tp, int bits, int how);
+void comstart(struct tty *tp);
+void comstop(struct tty *tp, int flags);
+void comattach(struct bus_device *dev);
+
+io_return_t
+comgetstat(
+       dev_t           dev,
+       int             flavor,
+       int             *data,
+       natural_t       *count);
+
+io_return_t
+comsetstat(
+       dev_t           dev,
+       int             flavor,
+       int             *data,
+       natural_t       count);
 
 #endif /* _COM_H_ */
diff --git a/i386/i386at/lpr.c b/i386/i386at/lpr.c
index 557eb15..6021bf5 100644
--- a/i386/i386at/lpr.c
+++ b/i386/i386at/lpr.c
@@ -46,18 +46,10 @@
 #include <i386at/autoconf.h>
 #include <i386at/lprreg.h>
   
-
 /* 
  * Driver information for auto-configuration stuff.
  */
 
-int    lprprobe();
-void   lprstop();
-void   lprintr(), lprstart();
-void   lprattach(struct bus_device *);
-int lprgetstat(), lprsetstat();
-void lprpr_addr();
-
 struct bus_device *lprinfo[NLPR];      /* ??? */
 
 static vm_offset_t lpr_std[NLPR] = { 0 };
@@ -70,7 +62,7 @@ struct tty    lpr_tty[NLPR];
 int lpr_alive[NLPR];
 
 int
-lprprobe(port, dev)
+lprprobe(dev)
 struct bus_device *dev;
 {
        u_short addr = (u_short) dev->address;
@@ -282,14 +274,14 @@ int       flags;
                tp->t_state |= TS_FLUSH;
 }
 int
-lprpr(unit)
+lprpr(int unit)
 {
        lprpr_addr(lprinfo[unit]->address);
        return 0;
 }
 
 void
-lprpr_addr(addr)
+lprpr_addr(unsigned short addr)
 {
        printf("DATA(%x) %x, STATUS(%x) %x, INTR_ENAB(%x) %x\n",
                DATA(addr), inb(DATA(addr)),
diff --git a/i386/i386at/lprreg.h b/i386/i386at/lprreg.h
index 1fb6230..0a12e10 100644
--- a/i386/i386at/lprreg.h
+++ b/i386/i386at/lprreg.h
@@ -35,4 +35,26 @@
 #define STATUS(addr)   (addr + 1)
 #define INTR_ENAB(addr)        (addr + 2)
 
+extern void lprintr(int unit);
+int lprprobe(struct bus_device *dev);
+void lprstop(struct tty *tp, int flags);
+void lprstart(struct tty *tp);
+void lprattach(struct bus_device *dev);
+
+io_return_t
+lprgetstat(
+       dev_t           dev,
+       int             flavor,
+       int             *data,
+       natural_t       *count);
+
+io_return_t
+lprsetstat(
+       dev_t           dev,
+       int             flavor,
+       int             *data,
+       natural_t       count);
+
+void lprpr_addr(unsigned short addr);
+
 #endif /* _LPRREG_H_ */
-- 
1.8.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]