summaryrefslogtreecommitdiffstats
path: root/sys/i386/isa/tw.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-04-24 01:39:55 +0000
committerjkh <jkh@FreeBSD.org>1995-04-24 01:39:55 +0000
commitb44f4f15820da6825937089f60f4257f83da9f19 (patch)
tree7803318374f21809cef7c00693ac76ae28ee7a21 /sys/i386/isa/tw.c
parent4b8b3f4b769ae14d8ef86e71b04759c06bbe3979 (diff)
downloadFreeBSD-src-b44f4f15820da6825937089f60f4257f83da9f19.zip
FreeBSD-src-b44f4f15820da6825937089f60f4257f83da9f19.tar.gz
I noticed that some new -W options had been turned on the kernel compile since
I made the changes I sent you before. In the interests of cleanliness, I made modifications to /sys/i386/isa/tw.c to kill the warnings and make it compile clean. While I was at it, I also made a bunch of internal functions static. Submitted by: Gene Stark <gene@starkhome.cs.sunysb.edu>
Diffstat (limited to 'sys/i386/isa/tw.c')
-rw-r--r--sys/i386/isa/tw.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/sys/i386/isa/tw.c b/sys/i386/isa/tw.c
index 72a5965..98dfb76 100644
--- a/sys/i386/isa/tw.c
+++ b/sys/i386/isa/tw.c
@@ -148,13 +148,6 @@
#include "i386/isa/isa_device.h"
-void twdelay25();
-void twdelayn(int n);
-void twsetuptimes(int *a);
-int twprobe();
-int twattach();
-void twintr(int unit);
-
/*
* Transmission is done by calling write() to send three byte packets of data.
* The first byte contains a four bit house code (0=A to 15=P).
@@ -201,6 +194,10 @@ void twintr(int unit);
#define TWPRI (PZERO+8) /* I don't know any better, so let's */
/* use the same as the line printer */
+int twprobe();
+int twattach();
+void twintr(int unit);
+
struct isa_driver twdriver = {
twprobe, twattach, "tw"
};
@@ -236,6 +233,15 @@ struct tw_sc {
#endif /* HIRESTIME */
} tw_sc[NTW];
+static void twdelay25();
+static void twdelayn(int n);
+static void twsetuptimes(int *a);
+static int wait_for_zero(struct tw_sc *sc);
+static int twgetbytes(struct tw_sc *sc, u_char *p, int cnt);
+static int twsend(struct tw_sc *sc, int h, int k, int cnt);
+static int next_zero(struct tw_sc *sc);
+static int twchecktime(int target, int tol);
+
/*
* Counter value for delay loop.
* It is adjusted by twprobe so that the delay loop takes about 25us.
@@ -255,7 +261,7 @@ int twdelaycount;
* fairly forgiving.
*/
-void twdelay25()
+static void twdelay25()
{
int cnt;
for(cnt = twdelaycount; cnt; cnt--); /* Should take about 25us */
@@ -268,7 +274,7 @@ void twdelay25()
* if we happen to be interrupted during the delay.
*/
-void twdelayn(int n)
+static void twdelayn(int n)
{
#ifdef HIRESTIME
int t, d;
@@ -572,7 +578,7 @@ short X10_KEY_INV[32] = { 12, 16, 4, 17, 2, 18, 10, 19,
#define TWRETRY 10 /* Try 10 times to sync with AC line */
-int twsend(sc, h, k, cnt)
+static int twsend(sc, h, k, cnt)
struct tw_sc *sc;
int h, k, cnt;
{
@@ -658,7 +664,7 @@ int h, k, cnt;
* X-10 packet.
*/
-int wait_for_zero(sc)
+static int wait_for_zero(sc)
struct tw_sc *sc;
{
int i, old, new, max, cnt;
@@ -690,7 +696,7 @@ struct tw_sc *sc;
* last bit was transmitted.
*/
-int next_zero(sc)
+static int next_zero(sc)
struct tw_sc *sc;
{
int d;
@@ -711,7 +717,7 @@ struct tw_sc *sc;
* Should be called at priority spltty()
*/
-int twputpkt(sc, p)
+static int twputpkt(sc, p)
struct tw_sc *sc;
u_char *p;
{
@@ -742,7 +748,7 @@ u_char *p;
* Should be called at priority spltty()
*/
-int twgetbytes(sc, p, cnt)
+static int twgetbytes(sc, p, cnt)
struct tw_sc *sc;
u_char *p;
int cnt;
@@ -938,7 +944,7 @@ int unit;
* or reception is on schedule.
*/
-void twsetuptimes(int *a)
+static void twsetuptimes(int *a)
{
struct timeval tv;
int i, t;
@@ -958,7 +964,7 @@ void twsetuptimes(int *a)
* on schedule.
*/
-int twchecktime(int target, int tol)
+static int twchecktime(int target, int tol)
{
struct timeval tv;
int t, d;
OpenPOWER on IntegriCloud