summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarin Ramesa <mpr@hi.t-com.hr>2013-11-29 22:53:48 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-12-05 06:11:19 +0900
commit3ede362d063931308f469768e27e096bafc34589 (patch)
treeb733347399d167dcd95e5972f00904cd8f7194a3
parent61f523520d663b541f773243514561e847d1ad01 (diff)
i386/i386at/autoconf.c, com.c, lpr.c: remove forward declarations
* 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.
-rw-r--r--i386/Makefrag.am2
-rw-r--r--i386/i386at/autoconf.c4
-rw-r--r--i386/i386at/com.c4
-rw-r--r--i386/i386at/com.h22
-rw-r--r--i386/i386at/lpr.c14
-rw-r--r--i386/i386at/lpr.h (renamed from i386/i386at/lprreg.h)22
6 files changed, 50 insertions, 18 deletions
diff --git a/i386/Makefrag.am b/i386/Makefrag.am
index 32730a5..15b867f 100644
--- a/i386/Makefrag.am
+++ b/i386/Makefrag.am
@@ -62,7 +62,7 @@ endif
if enable_lpr
libkernel_a_SOURCES += \
i386/i386at/lpr.c \
- i386/i386at/lprreg.h
+ i386/i386at/lpr.h
endif
diff --git a/i386/i386at/autoconf.c b/i386/i386at/autoconf.c
index 66493b0..31bb73c 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/lpr.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..4431c37 100644
--- a/i386/i386at/lpr.c
+++ b/i386/i386at/lpr.c
@@ -44,20 +44,12 @@
#include <i386/pio.h>
#include <chips/busses.h>
#include <i386at/autoconf.h>
-#include <i386at/lprreg.h>
+#include <i386at/lpr.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 };
@@ -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/lpr.h
index 1fb6230..ca7aeea 100644
--- a/i386/i386at/lprreg.h
+++ b/i386/i386at/lpr.h
@@ -35,4 +35,26 @@
#define STATUS(addr) (addr + 1)
#define INTR_ENAB(addr) (addr + 2)
+extern void lprintr(int unit);
+int lprprobe(int port, 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_ */