Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x68k/dev Make local functions static.
details: https://anonhg.NetBSD.org/src/rev/0722a98ac098
branches: trunk
changeset: 368121:0722a98ac098
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Fri Jun 24 23:44:18 2022 +0000
description:
Make local functions static.
diffstat:
sys/arch/x68k/dev/kbd.c | 48 +++++++++++++++++++++++++-----------------------
1 files changed, 25 insertions(+), 23 deletions(-)
diffs (148 lines):
diff -r 4e9a1e641200 -r 0722a98ac098 sys/arch/x68k/dev/kbd.c
--- a/sys/arch/x68k/dev/kbd.c Fri Jun 24 22:28:11 2022 +0000
+++ b/sys/arch/x68k/dev/kbd.c Fri Jun 24 23:44:18 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kbd.c,v 1.41 2022/05/26 14:33:29 tsutsui Exp $ */
+/* $NetBSD: kbd.c,v 1.42 2022/06/24 23:44:18 tsutsui Exp $ */
/*
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.41 2022/05/26 14:33:29 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.42 2022/06/24 23:44:18 tsutsui Exp $");
#include "ite.h"
#include "bell.h"
@@ -74,13 +74,15 @@
};
void kbdenable(int);
-int kbdintr(void *);
-void kbdsoftint(void *);
-void kbd_bell(int);
+void kbd_setLED(void);
+#if NITE > 0
int kbdcngetc(void);
-void kbd_setLED(void);
-int kbd_send_command(int);
+#endif
+static int kbdintr(void *);
+static void kbdsoftint(void *);
+static void kbd_bell(int);
+static int kbd_send_command(int);
static int kbdmatch(device_t, cfdata_t, void *);
static void kbdattach(device_t, device_t, void *);
@@ -90,12 +92,12 @@
static int kbd_attached;
-dev_type_open(kbdopen);
-dev_type_close(kbdclose);
-dev_type_read(kbdread);
-dev_type_ioctl(kbdioctl);
-dev_type_poll(kbdpoll);
-dev_type_kqfilter(kbdkqfilter);
+static dev_type_open(kbdopen);
+static dev_type_close(kbdclose);
+static dev_type_read(kbdread);
+static dev_type_ioctl(kbdioctl);
+static dev_type_poll(kbdpoll);
+static dev_type_kqfilter(kbdkqfilter);
const struct cdevsw kbd_cdevsw = {
.d_open = kbdopen,
@@ -181,7 +183,7 @@
aprint_normal(" (no connected keyboard)");
}
-int
+static int
kbdopen(dev_t dev, int flags, int mode, struct lwp *l)
{
struct kbd_softc *k;
@@ -198,7 +200,7 @@
return (0);
}
-int
+static int
kbdclose(dev_t dev, int flags, int mode, struct lwp *l)
{
struct kbd_softc *k = device_lookup_private(&kbd_cd, minor(dev));
@@ -212,7 +214,7 @@
}
-int
+static int
kbdread(dev_t dev, struct uio *uio, int flags)
{
struct kbd_softc *k = device_lookup_private(&kbd_cd, minor(dev));
@@ -227,7 +229,7 @@
void opm_bell_off(void);
#endif
-int
+static int
kbdioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
{
struct kbd_softc *k = device_lookup_private(&kbd_cd, minor(dev));
@@ -299,7 +301,7 @@
}
-int
+static int
kbdpoll(dev_t dev, int events, struct lwp *l)
{
struct kbd_softc *k;
@@ -308,7 +310,7 @@
return (ev_poll(&k->sc_events, events, l));
}
-int
+static int
kbdkqfilter(dev_t dev, struct knote *kn)
{
struct kbd_softc *k;
@@ -323,7 +325,7 @@
static int kbdputoff = 0;
static int kbdgetoff = 0;
-int
+static int
kbdintr(void *arg)
{
uint8_t c, st;
@@ -366,7 +368,7 @@
return 0;
}
-void
+static void
kbdsoftint(void *arg) /* what if ite is not configured? */
{
struct kbd_softc *sc = arg;
@@ -385,7 +387,7 @@
mutex_exit(&sc->sc_lock);
}
-void
+static void
kbd_bell(int mode)
{
#if NBELL > 0
@@ -404,7 +406,7 @@
mfp_send_usart(~kbdled | 0x80);
}
-int
+static int
kbd_send_command(int cmd)
{
switch (cmd) {
Home |
Main Index |
Thread Index |
Old Index