summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authormaxv <maxv@NetBSD.org>2019-12-01 08:23:09 +0000
committermaxv <maxv@NetBSD.org>2019-12-01 08:23:09 +0000
commitfc96044a1b130df714cb970111030a7d8b5aa1b1 (patch)
treee81b5a608910b88bccfbb6cb114b830f49952ed8 /sys/dev
parent7161f12fa30748d04ba19e1abb87699895079e78 (diff)
localify
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_ural.c20
-rw-r--r--sys/dev/usb/uaudio.c24
-rw-r--r--sys/dev/usb/uberry.c17
-rw-r--r--sys/dev/usb/ubt.c22
-rw-r--r--sys/dev/usb/ucycom.c52
-rw-r--r--sys/dev/usb/udsbr.c26
-rw-r--r--sys/dev/usb/uep.c26
-rw-r--r--sys/dev/usb/ugen.c56
-rw-r--r--sys/dev/usb/uhid.c48
-rw-r--r--sys/dev/usb/uhso.c48
-rw-r--r--sys/dev/usb/ulpt.c70
-rw-r--r--sys/dev/usb/umidi.c24
-rw-r--r--sys/dev/usb/ums.c28
-rw-r--r--sys/dev/usb/urio.c40
-rw-r--r--sys/dev/usb/usscanner.c24
-rw-r--r--sys/dev/usb/ustir.c22
-rw-r--r--sys/dev/usb/uthum.c51
-rw-r--r--sys/dev/usb/utoppy.c40
-rw-r--r--sys/dev/usb/uvideo.c24
-rw-r--r--sys/dev/usb/uvscom.c22
-rw-r--r--sys/dev/usb/uyap.c24
21 files changed, 352 insertions, 356 deletions
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index 4f7516408fb..b2814d45de4 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ural.c,v 1.60 2019/09/14 12:42:36 maxv Exp $ */
+/* $NetBSD: if_ural.c,v 1.61 2019/12/01 08:27:54 maxv Exp $ */
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/usb/if_ural.c,v 1.40 2006/06/02 23:14:40 sam Exp $ */
/*-
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.60 2019/09/14 12:42:36 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.61 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -335,15 +335,15 @@ static const struct {
{ 161, 0x08808, 0x0242f, 0x00281 }
};
-int ural_match(device_t, cfdata_t, void *);
-void ural_attach(device_t, device_t, void *);
-int ural_detach(device_t, int);
-int ural_activate(device_t, enum devact);
+static int ural_match(device_t, cfdata_t, void *);
+static void ural_attach(device_t, device_t, void *);
+static int ural_detach(device_t, int);
+static int ural_activate(device_t, enum devact);
CFATTACH_DECL_NEW(ural, sizeof(struct ural_softc), ural_match, ural_attach,
ural_detach, ural_activate);
-int
+static int
ural_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -352,7 +352,7 @@ ural_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
-void
+static void
ural_attach(device_t parent, device_t self, void *aux)
{
struct ural_softc *sc = device_private(self);
@@ -524,7 +524,7 @@ ural_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
ural_detach(device_t self, int flags)
{
struct ural_softc *sc = device_private(self);
@@ -2267,7 +2267,7 @@ ural_stop(struct ifnet *ifp, int disable)
}
}
-int
+static int
ural_activate(device_t self, enum devact act)
{
struct ural_softc *sc = device_private(self);
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index 1beede67c76..a13deaf3588 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uaudio.c,v 1.162 2019/11/04 05:46:39 isaki Exp $ */
+/* $NetBSD: uaudio.c,v 1.163 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 1999, 2012 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.162 2019/11/04 05:46:39 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uaudio.c,v 1.163 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -367,11 +367,11 @@ Static const struct audio_hw_if uaudio_hw_if = {
.get_locks = uaudio_get_locks,
};
-int uaudio_match(device_t, cfdata_t, void *);
-void uaudio_attach(device_t, device_t, void *);
-int uaudio_detach(device_t, int);
-void uaudio_childdet(device_t, device_t);
-int uaudio_activate(device_t, enum devact);
+static int uaudio_match(device_t, cfdata_t, void *);
+static void uaudio_attach(device_t, device_t, void *);
+static int uaudio_detach(device_t, int);
+static void uaudio_childdet(device_t, device_t);
+static int uaudio_activate(device_t, enum devact);
@@ -379,7 +379,7 @@ CFATTACH_DECL2_NEW(uaudio, sizeof(struct uaudio_softc),
uaudio_match, uaudio_attach, uaudio_detach, uaudio_activate, NULL,
uaudio_childdet);
-int
+static int
uaudio_match(device_t parent, cfdata_t match, void *aux)
{
struct usbif_attach_arg *uiaa = aux;
@@ -393,7 +393,7 @@ uaudio_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_IFACECLASS_IFACESUBCLASS;
}
-void
+static void
uaudio_attach(device_t parent, device_t self, void *aux)
{
struct uaudio_softc *sc = device_private(self);
@@ -490,7 +490,7 @@ uaudio_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
uaudio_activate(device_t self, enum devact act)
{
struct uaudio_softc *sc = device_private(self);
@@ -504,7 +504,7 @@ uaudio_activate(device_t self, enum devact act)
}
}
-void
+static void
uaudio_childdet(device_t self, device_t child)
{
struct uaudio_softc *sc = device_private(self);
@@ -513,7 +513,7 @@ uaudio_childdet(device_t self, device_t child)
sc->sc_audiodev = NULL;
}
-int
+static int
uaudio_detach(device_t self, int flags)
{
struct uaudio_softc *sc = device_private(self);
diff --git a/sys/dev/usb/uberry.c b/sys/dev/usb/uberry.c
index f497886273c..e0b2dd60cec 100644
--- a/sys/dev/usb/uberry.c
+++ b/sys/dev/usb/uberry.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uberry.c,v 1.14 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: uberry.c,v 1.15 2019/12/01 08:27:54 maxv Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uberry.c,v 1.14 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uberry.c,v 1.15 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -89,10 +89,9 @@ static const struct usb_devno uberry_devs[] = {
#define uberry_lookup(v, p) usb_lookup(uberry_devs, v, p)
#define UBERRY_CONFIG_NO 1
-int uberry_match(device_t, cfdata_t, void *);
-void uberry_attach(device_t, device_t, void *);
-int uberry_detach(device_t, int);
-int uberry_activate(device_t, enum devact);
+static int uberry_match(device_t, cfdata_t, void *);
+static void uberry_attach(device_t, device_t, void *);
+static int uberry_detach(device_t, int);
CFATTACH_DECL_NEW(uberry, sizeof(struct uberry_softc), uberry_match,
uberry_attach, uberry_detach, NULL);
@@ -156,7 +155,7 @@ uberry_dual_mode(struct uberry_softc *sc)
}
-int
+static int
uberry_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -166,7 +165,7 @@ uberry_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE);
}
-void
+static void
uberry_attach(device_t parent, device_t self, void *aux)
{
struct uberry_softc *sc = device_private(self);
@@ -199,7 +198,7 @@ uberry_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
uberry_detach(device_t self, int flags)
{
struct uberry_softc *sc = device_private(self);
diff --git a/sys/dev/usb/ubt.c b/sys/dev/usb/ubt.c
index ee826ab3f49..cf31028d007 100644
--- a/sys/dev/usb/ubt.c
+++ b/sys/dev/usb/ubt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ubt.c,v 1.63 2019/09/22 07:29:16 dsainty Exp $ */
+/* $NetBSD: ubt.c,v 1.64 2019/12/01 08:27:54 maxv Exp $ */
/*-
* Copyright (c) 2006 Itronix Inc.
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.63 2019/09/22 07:29:16 dsainty Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ubt.c,v 1.64 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -289,10 +289,10 @@ static const struct hci_if ubt_hci = {
*
*/
-int ubt_match(device_t, cfdata_t, void *);
-void ubt_attach(device_t, device_t, void *);
-int ubt_detach(device_t, int);
-int ubt_activate(device_t, enum devact);
+static int ubt_match(device_t, cfdata_t, void *);
+static void ubt_attach(device_t, device_t, void *);
+static int ubt_detach(device_t, int);
+static int ubt_activate(device_t, enum devact);
CFATTACH_DECL_NEW(ubt, sizeof(struct ubt_softc), ubt_match, ubt_attach,
ubt_detach, ubt_activate);
@@ -306,7 +306,7 @@ static void ubt_abortdealloc(struct ubt_softc *);
* Use value of -1 to indicate a wildcard
* To override another entry, add details earlier
*/
-const struct ubt_devno {
+static const struct ubt_devno {
int vendor;
int product;
int class;
@@ -444,7 +444,7 @@ const struct ubt_devno {
},
};
-int
+static int
ubt_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -475,7 +475,7 @@ ubt_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
ubt_attach(device_t parent, device_t self, void *aux)
{
struct ubt_softc *sc = device_private(self);
@@ -674,7 +674,7 @@ ubt_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
ubt_detach(device_t self, int flags)
{
struct ubt_softc *sc = device_private(self);
@@ -721,7 +721,7 @@ ubt_detach(device_t self, int flags)
return 0;
}
-int
+static int
ubt_activate(device_t self, enum devact act)
{
struct ubt_softc *sc = device_private(self);
diff --git a/sys/dev/usb/ucycom.c b/sys/dev/usb/ucycom.c
index dd0f71798cc..0fb6a014fae 100644
--- a/sys/dev/usb/ucycom.c
+++ b/sys/dev/usb/ucycom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ucycom.c,v 1.47 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: ucycom.c,v 1.48 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2005 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.47 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ucycom.c,v 1.48 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -142,14 +142,14 @@ struct ucycom_softc {
char sc_dying;
};
-dev_type_open(ucycomopen);
-dev_type_close(ucycomclose);
-dev_type_read(ucycomread);
-dev_type_write(ucycomwrite);
-dev_type_ioctl(ucycomioctl);
-dev_type_stop(ucycomstop);
-dev_type_tty(ucycomtty);
-dev_type_poll(ucycompoll);
+static dev_type_open(ucycomopen);
+static dev_type_close(ucycomclose);
+static dev_type_read(ucycomread);
+static dev_type_write(ucycomwrite);
+static dev_type_ioctl(ucycomioctl);
+static dev_type_stop(ucycomstop);
+static dev_type_tty(ucycomtty);
+static dev_type_poll(ucycompoll);
const struct cdevsw ucycom_cdevsw = {
.d_open = ucycomopen,
@@ -190,15 +190,15 @@ Static const struct usb_devno ucycom_devs[] = {
};
#define ucycom_lookup(v, p) usb_lookup(ucycom_devs, v, p)
-int ucycom_match(device_t, cfdata_t, void *);
-void ucycom_attach(device_t, device_t, void *);
-int ucycom_detach(device_t, int);
-int ucycom_activate(device_t, enum devact);
+static int ucycom_match(device_t, cfdata_t, void *);
+static void ucycom_attach(device_t, device_t, void *);
+static int ucycom_detach(device_t, int);
+static int ucycom_activate(device_t, enum devact);
CFATTACH_DECL_NEW(ucycom, sizeof(struct ucycom_softc), ucycom_match,
ucycom_attach, ucycom_detach, ucycom_activate);
-int
+static int
ucycom_match(device_t parent, cfdata_t match, void *aux)
{
struct uhidev_attach_arg *uha = aux;
@@ -207,7 +207,7 @@ ucycom_match(device_t parent, cfdata_t match, void *aux)
!= NULL ? UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
-void
+static void
ucycom_attach(device_t parent, device_t self, void *aux)
{
struct ucycom_softc *sc = device_private(self);
@@ -241,7 +241,7 @@ ucycom_attach(device_t parent, device_t self, void *aux)
}
-int
+static int
ucycom_detach(device_t self, int flags)
{
struct ucycom_softc *sc = device_private(self);
@@ -287,7 +287,7 @@ ucycom_detach(device_t self, int flags)
return 0;
}
-int
+static int
ucycom_activate(device_t self, enum devact act)
{
struct ucycom_softc *sc = device_private(self);
@@ -321,7 +321,7 @@ ucycom_shutdown(struct ucycom_softc *sc)
}
#endif
-int
+static int
ucycomopen(dev_t dev, int flag, int mode, struct lwp *l)
{
struct ucycom_softc *sc =
@@ -436,7 +436,7 @@ bad:
}
-int
+static int
ucycomclose(dev_t dev, int flag, int mode, struct lwp *l)
{
struct ucycom_softc *sc =
@@ -725,13 +725,13 @@ ucycomparam(struct tty *tp, struct termios *t)
return err;
}
-void
+static void
ucycomstop(struct tty *tp, int flag)
{
DPRINTF(("ucycomstop: flag=%d\n", flag));
}
-int
+static int
ucycomread(dev_t dev, struct uio *uio, int flag)
{
struct ucycom_softc *sc =
@@ -749,7 +749,7 @@ ucycomread(dev_t dev, struct uio *uio, int flag)
}
-int
+static int
ucycomwrite(dev_t dev, struct uio *uio, int flag)
{
struct ucycom_softc *sc =
@@ -766,7 +766,7 @@ ucycomwrite(dev_t dev, struct uio *uio, int flag)
return err;
}
-struct tty *
+static struct tty *
ucycomtty(dev_t dev)
{
struct ucycom_softc *sc =
@@ -778,7 +778,7 @@ ucycomtty(dev_t dev)
return tp;
}
-int
+static int
ucycomioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
{
struct ucycom_softc *sc =
@@ -854,7 +854,7 @@ ucycomioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
return err;
}
-int
+static int
ucycompoll(dev_t dev, int events, struct lwp *l)
{
struct ucycom_softc *sc =
diff --git a/sys/dev/usb/udsbr.c b/sys/dev/usb/udsbr.c
index 82d9e6a372e..78093dd4162 100644
--- a/sys/dev/usb/udsbr.c
+++ b/sys/dev/usb/udsbr.c
@@ -1,4 +1,4 @@
-/* $NetBSD: udsbr.c,v 1.28 2019/09/14 12:50:16 maxv Exp $ */
+/* $NetBSD: udsbr.c,v 1.29 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: udsbr.c,v 1.28 2019/09/14 12:50:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udsbr.c,v 1.29 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -73,7 +73,7 @@ int udsbrdebug = 0;
Static int udsbr_get_info(void *, struct radio_info *);
Static int udsbr_set_info(void *, struct radio_info *);
-const struct radio_hw_if udsbr_hw_if = {
+static const struct radio_hw_if udsbr_hw_if = {
NULL, /* open */
NULL, /* close */
udsbr_get_info,
@@ -101,16 +101,16 @@ Static void udsbr_stop(struct udsbr_softc *);
Static void udsbr_setfreq(struct udsbr_softc *, int);
Static int udsbr_status(struct udsbr_softc *);
-int udsbr_match(device_t, cfdata_t, void *);
-void udsbr_attach(device_t, device_t, void *);
-void udsbr_childdet(device_t, device_t);
-int udsbr_detach(device_t, int);
-int udsbr_activate(device_t, enum devact);
+static int udsbr_match(device_t, cfdata_t, void *);
+static void udsbr_attach(device_t, device_t, void *);
+static void udsbr_childdet(device_t, device_t);
+static int udsbr_detach(device_t, int);
+static int udsbr_activate(device_t, enum devact);
CFATTACH_DECL2_NEW(udsbr, sizeof(struct udsbr_softc), udsbr_match,
udsbr_attach, udsbr_detach, udsbr_activate, NULL, udsbr_childdet);
-int
+static int
udsbr_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -123,7 +123,7 @@ udsbr_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_VENDOR_PRODUCT;
}
-void
+static void
udsbr_attach(device_t parent, device_t self, void *aux)
{
struct udsbr_softc *sc = device_private(self);
@@ -161,12 +161,12 @@ udsbr_attach(device_t parent, device_t self, void *aux)
return;
}
-void
+static void
udsbr_childdet(device_t self, device_t child)
{
}
-int
+static int
udsbr_detach(device_t self, int flags)
{
struct udsbr_softc *sc = device_private(self);
@@ -181,7 +181,7 @@ udsbr_detach(device_t self, int flags)
return rv;
}
-int
+static int
udsbr_activate(device_t self, enum devact act)
{
struct udsbr_softc *sc = device_private(self);
diff --git a/sys/dev/usb/uep.c b/sys/dev/usb/uep.c
index e654feeb054..f50efd0348a 100644
--- a/sys/dev/usb/uep.c
+++ b/sys/dev/usb/uep.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uep.c,v 1.22 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: uep.c,v 1.23 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
* eGalax USB touchpanel controller driver.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uep.c,v 1.22 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uep.c,v 1.23 2019/12/01 08:27:54 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -95,22 +95,22 @@ Static int uep_enable(void *);
Static void uep_disable(void *);
Static int uep_ioctl(void *, u_long, void *, int, struct lwp *);
-const struct wsmouse_accessops uep_accessops = {
+static const struct wsmouse_accessops uep_accessops = {
uep_enable,
uep_ioctl,
uep_disable,
};
-int uep_match(device_t, cfdata_t, void *);
-void uep_attach(device_t, device_t, void *);
-void uep_childdet(device_t, device_t);
-int uep_detach(device_t, int);
-int uep_activate(device_t, enum devact);
+static int uep_match(device_t, cfdata_t, void *);
+static void uep_attach(device_t, device_t, void *);
+static void uep_childdet(device_t, device_t);
+static int uep_detach(device_t, int);
+static int uep_activate(device_t, enum devact);
CFATTACH_DECL2_NEW(uep, sizeof(struct uep_softc), uep_match, uep_attach,
uep_detach, uep_activate, NULL, uep_childdet);
-int
+static int
uep_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -128,7 +128,7 @@ uep_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
uep_attach(device_t parent, device_t self, void *aux)
{
struct uep_softc *sc = device_private(self);
@@ -232,7 +232,7 @@ uep_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
uep_detach(device_t self, int flags)
{
struct uep_softc *sc = device_private(self);
@@ -255,7 +255,7 @@ uep_detach(device_t self, int flags)
return rv;
}
-void
+static void
uep_childdet(device_t self, device_t child)
{
struct uep_softc *sc = device_private(self);
@@ -264,7 +264,7 @@ uep_childdet(device_t self, device_t child)
sc->sc_wsmousedev = NULL;
}
-int
+static int
uep_activate(device_t self, enum devact act)
{
struct uep_softc *sc = device_private(self);
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 14dc2dcf4bd..19f349e96f5 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ugen.c,v 1.146 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: ugen.c,v 1.147 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 1998, 2004 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.146 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ugen.c,v 1.147 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -138,13 +138,13 @@ struct ugen_softc {
u_char sc_dying;
};
-dev_type_open(ugenopen);
-dev_type_close(ugenclose);
-dev_type_read(ugenread);
-dev_type_write(ugenwrite);
-dev_type_ioctl(ugenioctl);
-dev_type_poll(ugenpoll);
-dev_type_kqfilter(ugenkqfilter);
+static dev_type_open(ugenopen);
+static dev_type_close(ugenclose);
+static dev_type_read(ugenread);
+static dev_type_write(ugenwrite);
+static dev_type_ioctl(ugenioctl);
+static dev_type_poll(ugenpoll);
+static dev_type_kqfilter(ugenkqfilter);
const struct cdevsw ugen_cdevsw = {
.d_open = ugenopen,
@@ -184,12 +184,12 @@ Static void ugen_clear_endpoints(struct ugen_softc *);
#define UGENENDPOINT(n) (minor(n) & 0xf)
#define UGENDEV(u, e) (makedev(0, ((u) << 4) | (e)))
-int ugenif_match(device_t, cfdata_t, void *);
-void ugenif_attach(device_t, device_t, void *);
-int ugen_match(device_t, cfdata_t, void *);
-void ugen_attach(device_t, device_t, void *);
-int ugen_detach(device_t, int);
-int ugen_activate(device_t, enum devact);
+static int ugenif_match(device_t, cfdata_t, void *);
+static void ugenif_attach(device_t, device_t, void *);
+static int ugen_match(device_t, cfdata_t, void *);
+static void ugen_attach(device_t, device_t, void *);
+static int ugen_detach(device_t, int);
+static int ugen_activate(device_t, enum devact);
CFATTACH_DECL_NEW(ugen, sizeof(struct ugen_softc), ugen_match,
ugen_attach, ugen_detach, ugen_activate);
@@ -199,7 +199,7 @@ CFATTACH_DECL_NEW(ugenif, sizeof(struct ugen_softc), ugenif_match,
/* toggle to control attach priority. -1 means "let autoconf decide" */
int ugen_override = -1;
-int
+static int
ugen_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -218,14 +218,14 @@ ugen_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-int
+static int
ugenif_match(device_t parent, cfdata_t match, void *aux)
{
/* Assume that they knew what they configured! (see ugenif(4)) */
return UMATCH_HIGHEST;
}
-void
+static void
ugen_attach(device_t parent, device_t self, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -243,7 +243,7 @@ ugen_attach(device_t parent, device_t self, void *aux)
ugenif_attach(parent, self, &uiaa);
}
-void
+static void
ugenif_attach(device_t parent, device_t self, void *aux)
{
struct ugen_softc *sc = device_private(self);
@@ -392,7 +392,7 @@ ugen_set_config(struct ugen_softc *sc, int configno, int chkopen)
return USBD_NORMAL_COMPLETION;
}
-int
+static int
ugenopen(dev_t dev, int flag, int mode, struct lwp *l)
{
struct ugen_softc *sc;
@@ -540,7 +540,7 @@ ugenopen(dev_t dev, int flag, int mode, struct lwp *l)
return 0;
}
-int
+static int
ugenclose(dev_t dev, int flag, int mode, struct lwp *l)
{
int endpt = UGENENDPOINT(dev);
@@ -826,7 +826,7 @@ ugen_do_read(struct ugen_softc *sc, int endpt, struct uio *uio, int flag)
return error;
}
-int
+static int
ugenread(dev_t dev, struct uio *uio, int flag)
{
int endpt = UGENENDPOINT(dev);
@@ -1016,7 +1016,7 @@ ugen_do_write(struct ugen_softc *sc, int endpt, struct uio *uio,
return error;
}
-int
+static int
ugenwrite(dev_t dev, struct uio *uio, int flag)
{
int endpt = UGENENDPOINT(dev);
@@ -1041,7 +1041,7 @@ ugenwrite(dev_t dev, struct uio *uio, int flag)
return error;
}
-int
+static int
ugen_activate(device_t self, enum devact act)
{
struct ugen_softc *sc = device_private(self);
@@ -1055,7 +1055,7 @@ ugen_activate(device_t self, enum devact act)
}
}
-int
+static int
ugen_detach(device_t self, int flags)
{
struct ugen_softc *sc = device_private(self);
@@ -1856,7 +1856,7 @@ ugen_do_ioctl(struct ugen_softc *sc, int endpt, u_long cmd,
return 0;
}
-int
+static int
ugenioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
{
int endpt = UGENENDPOINT(dev);
@@ -1874,7 +1874,7 @@ ugenioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
return error;
}
-int
+static int
ugenpoll(dev_t dev, int events, struct lwp *l)
{
struct ugen_softc *sc;
@@ -2096,7 +2096,7 @@ static const struct filterops ugenwrite_bulk_filtops = {
.f_event = filt_ugenwrite_bulk,
};
-int
+static int
ugenkqfilter(dev_t dev, struct knote *kn)
{
struct ugen_softc *sc;
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index ae98d4e40f6..19964f28036 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhid.c,v 1.108 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: uhid.c,v 1.109 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 1998, 2004, 2008, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.108 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.109 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_compat_netbsd.h"
@@ -111,13 +111,13 @@ struct uhid_softc {
#define UHID_CHUNK 128 /* chunk size for read */
#define UHID_BSIZE 1020 /* buffer size */
-dev_type_open(uhidopen);
-dev_type_close(uhidclose);
-dev_type_read(uhidread);
-dev_type_write(uhidwrite);
-dev_type_ioctl(uhidioctl);
-dev_type_poll(uhidpoll);
-dev_type_kqfilter(uhidkqfilter);
+static dev_type_open(uhidopen);
+static dev_type_close(uhidclose);
+static dev_type_read(uhidread);
+static dev_type_write(uhidwrite);
+static dev_type_ioctl(uhidioctl);
+static dev_type_poll(uhidpoll);
+static dev_type_kqfilter(uhidkqfilter);
const struct cdevsw uhid_cdevsw = {
.d_open = uhidopen,
@@ -141,15 +141,15 @@ Static int uhid_do_read(struct uhid_softc *, struct uio *, int);
Static int uhid_do_write(struct uhid_softc *, struct uio *, int);
Static int uhid_do_ioctl(struct uhid_softc*, u_long, void *, int, struct lwp *);
-int uhid_match(device_t, cfdata_t, void *);
-void uhid_attach(device_t, device_t, void *);
-int uhid_detach(device_t, int);
-int uhid_activate(device_t, enum devact);
+static int uhid_match(device_t, cfdata_t, void *);
+static void uhid_attach(device_t, device_t, void *);
+static int uhid_detach(device_t, int);
+static int uhid_activate(device_t, enum devact);
CFATTACH_DECL_NEW(uhid, sizeof(struct uhid_softc), uhid_match, uhid_attach,
uhid_detach, uhid_activate);
-int
+static int
uhid_match(device_t parent, cfdata_t match, void *aux)
{
#ifdef UHID_DEBUG
@@ -164,7 +164,7 @@ uhid_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_IFACECLASS_GENERIC;
}
-void
+static void
uhid_attach(device_t parent, device_t self, void *aux)
{
struct uhid_softc *sc = device_private(self);
@@ -200,7 +200,7 @@ uhid_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
uhid_activate(device_t self, enum devact act)
{
struct uhid_softc *sc = device_private(self);
@@ -214,7 +214,7 @@ uhid_activate(device_t self, enum devact act)
}
}
-int
+static int
uhid_detach(device_t self, int flags)
{
struct uhid_softc *sc = device_private(self);
@@ -304,7 +304,7 @@ uhid_softintr(void *cookie)
mutex_exit(proc_lock);
}
-int
+static int
uhidopen(dev_t dev, int flag, int mode, struct lwp *l)
{
struct uhid_softc *sc;
@@ -357,7 +357,7 @@ uhidopen(dev_t dev, int flag, int mode, struct lwp *l)
return 0;
}
-int
+static int
uhidclose(dev_t dev, int flag, int mode, struct lwp *l)
{
struct uhid_softc *sc;
@@ -444,7 +444,7 @@ uhid_do_read(struct uhid_softc *sc, struct uio *uio, int flag)
return error;
}
-int
+static int
uhidread(dev_t dev, struct uio *uio, int flag)
{
struct uhid_softc *sc;
@@ -467,7 +467,7 @@ uhidread(dev_t dev, struct uio *uio, int flag)
return error;
}
-int
+static int
uhid_do_write(struct uhid_softc *sc, struct uio *uio, int flag)
{
int error;
@@ -683,7 +683,7 @@ uhid_do_ioctl(struct uhid_softc *sc, u_long cmd, void *addr,
return 0;
}
-int
+static int
uhidioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
{
struct uhid_softc *sc;
@@ -711,7 +711,7 @@ uhidioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
return error;
}
-int
+static int
uhidpoll(dev_t dev, int events, struct lwp *l)
{
struct uhid_softc *sc;
@@ -771,7 +771,7 @@ static const struct filterops uhid_seltrue_filtops = {
.f_event = filt_seltrue,
};
-int
+static int
uhidkqfilter(dev_t dev, struct knote *kn)
{
struct uhid_softc *sc;
diff --git a/sys/dev/usb/uhso.c b/sys/dev/usb/uhso.c
index 12f80744feb..8088c767d1b 100644
--- a/sys/dev/usb/uhso.c
+++ b/sys/dev/usb/uhso.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uhso.c,v 1.30 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: uhso.c,v 1.31 2019/12/01 08:27:54 maxv Exp $ */
/*-
* Copyright (c) 2009 Iain Hibbert
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.30 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhso.c,v 1.31 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@@ -333,9 +333,9 @@ struct uhso_softc {
#define UHSO_CONFIG_NO 1
-int uhso_match(device_t, cfdata_t, void *);
-void uhso_attach(device_t, device_t, void *);
-int uhso_detach(device_t, int);
+static int uhso_match(device_t, cfdata_t, void *);
+static void uhso_attach(device_t, device_t, void *);
+static int uhso_detach(device_t, int);
@@ -372,14 +372,14 @@ Static void uhso_tty_detach(struct uhso_port *);
Static void uhso_tty_read_cb(struct usbd_xfer *, void *, usbd_status);
Static void uhso_tty_write_cb(struct usbd_xfer *, void *, usbd_status);
-dev_type_open(uhso_tty_open);
-dev_type_close(uhso_tty_close);
-dev_type_read(uhso_tty_read);
-dev_type_write(uhso_tty_write);
-dev_type_ioctl(uhso_tty_ioctl);
-dev_type_stop(uhso_tty_stop);
-dev_type_tty(uhso_tty_tty);
-dev_type_poll(uhso_tty_poll);
+static dev_type_open(uhso_tty_open);
+static dev_type_close(uhso_tty_close);
+static dev_type_read(uhso_tty_read);
+static dev_type_write(uhso_tty_write);
+static dev_type_ioctl(uhso_tty_ioctl);
+static dev_type_stop(uhso_tty_stop);
+static dev_type_tty(uhso_tty_tty);
+static dev_type_poll(uhso_tty_poll);
const struct cdevsw uhso_cdevsw = {
.d_open = uhso_tty_open,
@@ -435,7 +435,7 @@ Static int uhso_ifnet_output(struct ifnet *, struct mbuf *,
*
*/
-int
+static int
uhso_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -453,7 +453,7 @@ uhso_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
uhso_attach(device_t parent, device_t self, void *aux)
{
struct uhso_softc *sc = device_private(self);
@@ -528,7 +528,7 @@ uhso_attach(device_t parent, device_t self, void *aux)
aprint_error_dev(self, "couldn't establish power handler\n");
}
-int
+static int
uhso_detach(device_t self, int flags)
{
struct uhso_softc *sc = device_private(self);
@@ -1477,7 +1477,7 @@ uhso_tty_read_cb(struct usbd_xfer *xfer, void * p, usbd_status status)
*
*/
-int
+static int
uhso_tty_open(dev_t dev, int flag, int mode, struct lwp *l)
{
struct uhso_softc *sc;
@@ -1579,7 +1579,7 @@ uhso_tty_init(struct uhso_port *hp)
return 0;
}
-int
+static int
uhso_tty_close(dev_t dev, int flag, int mode, struct lwp *l)
{
struct uhso_softc *sc = device_lookup_private(&uhso_cd, UHSOUNIT(dev));
@@ -1630,7 +1630,7 @@ uhso_tty_clean(struct uhso_port *hp)
}
}
-int
+static int
uhso_tty_read(dev_t dev, struct uio *uio, int flag)
{
struct uhso_softc *sc = device_lookup_private(&uhso_cd, UHSOUNIT(dev));
@@ -1653,7 +1653,7 @@ uhso_tty_read(dev_t dev, struct uio *uio, int flag)
return error;
}
-int
+static int
uhso_tty_write(dev_t dev, struct uio *uio, int flag)
{
struct uhso_softc *sc = device_lookup_private(&uhso_cd, UHSOUNIT(dev));
@@ -1676,7 +1676,7 @@ uhso_tty_write(dev_t dev, struct uio *uio, int flag)
return error;
}
-int
+static int
uhso_tty_ioctl(dev_t dev, u_long cmd, void *data, int flag, struct lwp *l)
{
struct uhso_softc *sc = device_lookup_private(&uhso_cd, UHSOUNIT(dev));
@@ -1761,7 +1761,7 @@ uhso_tty_do_ioctl(struct uhso_port *hp, u_long cmd, void *data, int flag,
}
/* this is called with tty_lock held */
-void
+static void
uhso_tty_stop(struct tty *tp, int flag)
{
#if 0
@@ -1771,7 +1771,7 @@ uhso_tty_stop(struct tty *tp, int flag)
#endif
}
-struct tty *
+static struct tty *
uhso_tty_tty(dev_t dev)
{
struct uhso_softc *sc = device_lookup_private(&uhso_cd, UHSOUNIT(dev));
@@ -1780,7 +1780,7 @@ uhso_tty_tty(dev_t dev)
return hp->hp_tp;
}
-int
+static int
uhso_tty_poll(dev_t dev, int events, struct lwp *l)
{
struct uhso_softc *sc = device_lookup_private(&uhso_cd, UHSOUNIT(dev));
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index e8e63f02e77..78a347efee6 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ulpt.c,v 1.103 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: ulpt.c,v 1.104 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.103 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.104 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -129,11 +129,11 @@ struct ulpt_softc {
u_char sc_dying;
};
-dev_type_open(ulptopen);
-dev_type_close(ulptclose);
-dev_type_write(ulptwrite);
-dev_type_read(ulptread);
-dev_type_ioctl(ulptioctl);
+static dev_type_open(ulptopen);
+static dev_type_close(ulptclose);
+static dev_type_write(ulptwrite);
+static dev_type_read(ulptread);
+static dev_type_ioctl(ulptioctl);
const struct cdevsw ulpt_cdevsw = {
.d_open = ulptopen,
@@ -150,15 +150,13 @@ const struct cdevsw ulpt_cdevsw = {
.d_flag = D_OTHER
};
-void ulpt_disco(void *);
-
-int ulpt_do_write(struct ulpt_softc *, struct uio *, int);
-int ulpt_do_read(struct ulpt_softc *, struct uio *, int);
-int ulpt_status(struct ulpt_softc *);
-void ulpt_reset(struct ulpt_softc *);
-int ulpt_statusmsg(u_char, struct ulpt_softc *);
-void ulpt_read_cb(struct usbd_xfer *, void *, usbd_status);
-void ulpt_tick(void *xsc);
+static int ulpt_do_write(struct ulpt_softc *, struct uio *, int);
+static int ulpt_do_read(struct ulpt_softc *, struct uio *, int);
+static int ulpt_status(struct ulpt_softc *);
+static void ulpt_reset(struct ulpt_softc *);
+static int ulpt_statusmsg(u_char, struct ulpt_softc *);
+static void ulpt_read_cb(struct usbd_xfer *, void *, usbd_status);
+static void ulpt_tick(void *xsc);
#if 0
void ieee1284_print_id(char *);
@@ -168,17 +166,17 @@ void ieee1284_print_id(char *);
#define ULPTFLAGS(s) (minor(s) & 0xe0)
-int ulpt_match(device_t, cfdata_t, void *);
-void ulpt_attach(device_t, device_t, void *);
-int ulpt_detach(device_t, int);
-int ulpt_activate(device_t, enum devact);
+static int ulpt_match(device_t, cfdata_t, void *);
+static void ulpt_attach(device_t, device_t, void *);
+static int ulpt_detach(device_t, int);
+static int ulpt_activate(device_t, enum devact);
CFATTACH_DECL_NEW(ulpt, sizeof(struct ulpt_softc), ulpt_match, ulpt_attach,
ulpt_detach, ulpt_activate);
-int
+static int
ulpt_match(device_t parent, cfdata_t match, void *aux)
{
struct usbif_attach_arg *uiaa = aux;
@@ -194,7 +192,7 @@ ulpt_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
ulpt_attach(device_t parent, device_t self, void *aux)
{
struct ulpt_softc *sc = device_private(self);
@@ -331,7 +329,7 @@ ulpt_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
ulpt_activate(device_t self, enum devact act)
{
struct ulpt_softc *sc = device_private(self);
@@ -345,7 +343,7 @@ ulpt_activate(device_t self, enum devact act)
}
}
-int
+static int
ulpt_detach(device_t self, int flags)
{
struct ulpt_softc *sc = device_private(self);
@@ -381,7 +379,7 @@ ulpt_detach(device_t self, int flags)
return 0;
}
-int
+static int
ulpt_status(struct ulpt_softc *sc)
{
usb_device_request_t req;
@@ -401,7 +399,7 @@ ulpt_status(struct ulpt_softc *sc)
return 0;
}
-void
+static void
ulpt_reset(struct ulpt_softc *sc)
{
usb_device_request_t req;
@@ -430,7 +428,7 @@ int ulptusein = 1;
/*
* Reset the printer, then wait until it's selected and not busy.
*/
-int
+static int
ulptopen(dev_t dev, int flag, int mode, struct lwp *l)
{
u_char flags = ULPTFLAGS(dev);
@@ -538,7 +536,7 @@ ulptopen(dev_t dev, int flag, int mode, struct lwp *l)
/*
* XXX Document return value semantics.
*/
-int
+static int
ulpt_statusmsg(u_char status, struct ulpt_softc *sc)
{
u_char new;
@@ -557,7 +555,7 @@ ulpt_statusmsg(u_char status, struct ulpt_softc *sc)
return status;
}
-int
+static int
ulptclose(dev_t dev, int flag, int mode,
struct lwp *l)
{
@@ -605,7 +603,7 @@ ulptclose(dev_t dev, int flag, int mode,
return 0;
}
-int
+static int
ulpt_do_write(struct ulpt_softc *sc, struct uio *uio, int flags)
{
uint32_t n;
@@ -635,7 +633,7 @@ ulpt_do_write(struct ulpt_softc *sc, struct uio *uio, int flags)
return error;
}
-int
+static int
ulptwrite(dev_t dev, struct uio *uio, int flags)
{
struct ulpt_softc *sc;
@@ -669,7 +667,7 @@ ulptwrite(dev_t dev, struct uio *uio, int flags)
* not interact with the device. See ucom.c for an example of how to
* do this.
*/
-int
+static int
ulpt_do_read(struct ulpt_softc *sc, struct uio *uio, int flags)
{
uint32_t n, nread, nreq;
@@ -817,7 +815,7 @@ done:
return error;
}
-int
+static int
ulptread(dev_t dev, struct uio *uio, int flags)
{
struct ulpt_softc *sc;
@@ -835,7 +833,7 @@ ulptread(dev_t dev, struct uio *uio, int flags)
return error;
}
-void
+static void
ulpt_read_cb(struct usbd_xfer *xfer, void *priv,
usbd_status status)
{
@@ -866,7 +864,7 @@ ulpt_read_cb(struct usbd_xfer *xfer, void *priv,
* XXX This should be adapted for continuous reads to allow select to
* work; see do_ulpt_read().
*/
-void
+static void
ulpt_tick(void *xsc)
{
struct ulpt_softc *sc = xsc;
@@ -881,7 +879,7 @@ ulpt_tick(void *xsc)
DPRINTFN(3, ("ulpt_tick: sc=%p err=%d\n", sc, err));
}
-int
+static int
ulptioctl(dev_t dev, u_long cmd, void *data,
int flag, struct lwp *l)
{
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c
index ad90303fd5a..b48335c9426 100644
--- a/sys/dev/usb/umidi.c
+++ b/sys/dev/usb/umidi.c
@@ -1,4 +1,4 @@
-/* $NetBSD: umidi.c,v 1.80 2019/10/03 05:16:16 maxv Exp $ */
+/* $NetBSD: umidi.c,v 1.81 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2001, 2012, 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.80 2019/10/03 05:16:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.81 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -308,16 +308,16 @@ struct midi_hw_if_ext umidi_hw_if_mm = {
.compress = 1,
};
-int umidi_match(device_t, cfdata_t, void *);
-void umidi_attach(device_t, device_t, void *);
-void umidi_childdet(device_t, device_t);
-int umidi_detach(device_t, int);
-int umidi_activate(device_t, enum devact);
+static int umidi_match(device_t, cfdata_t, void *);
+static void umidi_attach(device_t, device_t, void *);
+static void umidi_childdet(device_t, device_t);
+static int umidi_detach(device_t, int);
+static int umidi_activate(device_t, enum devact);
CFATTACH_DECL2_NEW(umidi, sizeof(struct umidi_softc), umidi_match,
umidi_attach, umidi_detach, umidi_activate, NULL, umidi_childdet);
-int
+static int
umidi_match(device_t parent, cfdata_t match, void *aux)
{
struct usbif_attach_arg *uiaa = aux;
@@ -335,7 +335,7 @@ umidi_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
umidi_attach(device_t parent, device_t self, void *aux)
{
usbd_status err;
@@ -418,7 +418,7 @@ out:
return;
}
-void
+static void
umidi_childdet(device_t self, device_t child)
{
int i;
@@ -434,7 +434,7 @@ umidi_childdet(device_t self, device_t child)
sc->sc_mididevs[i].mdev = NULL;
}
-int
+static int
umidi_activate(device_t self, enum devact act)
{
struct umidi_softc *sc = device_private(self);
@@ -451,7 +451,7 @@ umidi_activate(device_t self, enum devact act)
}
}
-int
+static int
umidi_detach(device_t self, int flags)
{
struct umidi_softc *sc = device_private(self);
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index 2433f30425f..412201e0686 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ums.c,v 1.94 2019/08/10 06:30:26 yhardy Exp $ */
+/* $NetBSD: ums.c,v 1.95 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 1998, 2017 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.94 2019/08/10 06:30:26 yhardy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ums.c,v 1.95 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -88,22 +88,22 @@ Static int ums_enable(void *);
Static void ums_disable(void *);
Static int ums_ioctl(void *, u_long, void *, int, struct lwp *);
-const struct wsmouse_accessops ums_accessops = {
+static const struct wsmouse_accessops ums_accessops = {
ums_enable,
ums_ioctl,
ums_disable,
};
-int ums_match(device_t, cfdata_t, void *);
-void ums_attach(device_t, device_t, void *);
-void ums_childdet(device_t, device_t);
-int ums_detach(device_t, int);
-int ums_activate(device_t, enum devact);
+static int ums_match(device_t, cfdata_t, void *);
+static void ums_attach(device_t, device_t, void *);
+static void ums_childdet(device_t, device_t);
+static int ums_detach(device_t, int);
+static int ums_activate(device_t, enum devact);
CFATTACH_DECL2_NEW(ums, sizeof(struct ums_softc), ums_match, ums_attach,
ums_detach, ums_activate, NULL, ums_childdet);
-int
+static int
ums_match(device_t parent, cfdata_t match, void *aux)
{
struct uhidev_attach_arg *uha = aux;
@@ -130,7 +130,7 @@ ums_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_IFACECLASS;
}
-void
+static void
ums_attach(device_t parent, device_t self, void *aux)
{
struct ums_softc *sc = device_private(self);
@@ -196,7 +196,7 @@ ums_attach(device_t parent, device_t self, void *aux)
hidms_attach(self, &sc->sc_ms, &ums_accessops);
}
-int
+static int
ums_activate(device_t self, enum devact act)
{
struct ums_softc *sc = device_private(self);
@@ -210,7 +210,7 @@ ums_activate(device_t self, enum devact act)
}
}
-void
+static void
ums_childdet(device_t self, device_t child)
{
struct ums_softc *sc = device_private(self);
@@ -219,7 +219,7 @@ ums_childdet(device_t self, device_t child)
sc->sc_ms.hidms_wsmousedev = NULL;
}
-int
+static int
ums_detach(device_t self, int flags)
{
struct ums_softc *sc = device_private(self);
@@ -236,7 +236,7 @@ ums_detach(device_t self, int flags)
return rv;
}
-void
+Static void
ums_intr(struct uhidev *addr, void *ibuf, u_int len)
{
struct ums_softc *sc = (struct ums_softc *)addr;
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index 5557034e5f0..b6b2ad50c25 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -1,4 +1,4 @@
-/* $NetBSD: urio.c,v 1.49 2019/09/14 12:41:32 maxv Exp $ */
+/* $NetBSD: urio.c,v 1.50 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: urio.c,v 1.49 2019/09/14 12:41:32 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: urio.c,v 1.50 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -74,11 +74,11 @@ int uriodebug = 0;
#endif
-dev_type_open(urioopen);
-dev_type_close(urioclose);
-dev_type_read(urioread);
-dev_type_write(uriowrite);
-dev_type_ioctl(urioioctl);
+static dev_type_open(urioopen);
+static dev_type_close(urioclose);
+static dev_type_read(urioread);
+static dev_type_write(uriowrite);
+static dev_type_ioctl(urioioctl);
const struct cdevsw urio_cdevsw = {
.d_open = urioopen,
@@ -132,15 +132,15 @@ static const struct usb_devno urio_devs[] = {
};
#define urio_lookup(v, p) usb_lookup(urio_devs, v, p)
-int urio_match(device_t, cfdata_t, void *);
-void urio_attach(device_t, device_t, void *);
-int urio_detach(device_t, int);
-int urio_activate(device_t, enum devact);
+static int urio_match(device_t, cfdata_t, void *);
+static void urio_attach(device_t, device_t, void *);
+static int urio_detach(device_t, int);
+static int urio_activate(device_t, enum devact);
CFATTACH_DECL_NEW(urio, sizeof(struct urio_softc), urio_match, urio_attach,
urio_detach, urio_activate);
-int
+static int
urio_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -151,7 +151,7 @@ urio_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
-void
+static void
urio_attach(device_t parent, device_t self, void *aux)
{
struct urio_softc *sc = device_private(self);
@@ -225,7 +225,7 @@ urio_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
urio_detach(device_t self, int flags)
{
struct urio_softc *sc = device_private(self);
@@ -269,7 +269,7 @@ urio_detach(device_t self, int flags)
return 0;
}
-int
+static int
urio_activate(device_t self, enum devact act)
{
struct urio_softc *sc = device_private(self);
@@ -283,7 +283,7 @@ urio_activate(device_t self, enum devact act)
}
}
-int
+static int
urioopen(dev_t dev, int flag, int mode, struct lwp *l)
{
struct urio_softc *sc;
@@ -318,7 +318,7 @@ urioopen(dev_t dev, int flag, int mode, struct lwp *l)
return 0;
}
-int
+static int
urioclose(dev_t dev, int flag, int mode,
struct lwp *l)
{
@@ -342,7 +342,7 @@ urioclose(dev_t dev, int flag, int mode,
return 0;
}
-int
+static int
urioread(dev_t dev, struct uio *uio, int flag)
{
struct urio_softc *sc;
@@ -396,7 +396,7 @@ urioread(dev_t dev, struct uio *uio, int flag)
return error;
}
-int
+static int
uriowrite(dev_t dev, struct uio *uio, int flag)
{
struct urio_softc *sc;
@@ -454,7 +454,7 @@ uriowrite(dev_t dev, struct uio *uio, int flag)
}
-int
+static int
urioioctl(dev_t dev, u_long cmd, void *addr, int flag, struct lwp *l)
{
struct urio_softc * sc;
diff --git a/sys/dev/usb/usscanner.c b/sys/dev/usb/usscanner.c
index 88e7fad1052..036576ae0c8 100644
--- a/sys/dev/usb/usscanner.c
+++ b/sys/dev/usb/usscanner.c
@@ -1,4 +1,4 @@
-/* $NetBSD: usscanner.c,v 1.45 2019/09/14 15:22:31 maxv Exp $ */
+/* $NetBSD: usscanner.c,v 1.46 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -47,7 +47,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usscanner.c,v 1.45 2019/09/14 15:22:31 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usscanner.c,v 1.46 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -151,17 +151,17 @@ Static callback usscanner_data_cb;
Static callback usscanner_sensecmd_cb;
Static callback usscanner_sensedata_cb;
-int usscanner_match(device_t, cfdata_t, void *);
-void usscanner_attach(device_t, device_t, void *);
-void usscanner_childdet(device_t, device_t);
-int usscanner_detach(device_t, int);
-int usscanner_activate(device_t, enum devact);
+static int usscanner_match(device_t, cfdata_t, void *);
+static void usscanner_attach(device_t, device_t, void *);
+static void usscanner_childdet(device_t, device_t);
+static int usscanner_detach(device_t, int);
+static int usscanner_activate(device_t, enum devact);
CFATTACH_DECL2_NEW(usscanner, sizeof(struct usscanner_softc),
usscanner_match, usscanner_attach, usscanner_detach, usscanner_activate,
NULL, usscanner_childdet);
-int
+static int
usscanner_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -175,7 +175,7 @@ usscanner_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
usscanner_attach(device_t parent, device_t self, void *aux)
{
struct usscanner_softc *sc = device_private(self);
@@ -349,7 +349,7 @@ usscanner_attach(device_t parent, device_t self, void *aux)
#endif
}
-void
+static void
usscanner_childdet(device_t self, device_t child)
{
struct usscanner_softc *sc = device_private(self);
@@ -358,7 +358,7 @@ usscanner_childdet(device_t self, device_t child)
sc->sc_child = NULL;
}
-int
+static int
usscanner_detach(device_t self, int flags)
{
struct usscanner_softc *sc = device_private(self);
@@ -423,7 +423,7 @@ usscanner_cleanup(struct usscanner_softc *sc)
}
}
-int
+static int
usscanner_activate(device_t self, enum devact act)
{
struct usscanner_softc *sc = device_private(self);
diff --git a/sys/dev/usb/ustir.c b/sys/dev/usb/ustir.c
index c19d8d1118d..38eafd620d3 100644
--- a/sys/dev/usb/ustir.c
+++ b/sys/dev/usb/ustir.c
@@ -1,4 +1,4 @@
-/* $NetBSD: ustir.c,v 1.42 2019/09/22 07:28:35 dsainty Exp $ */
+/* $NetBSD: ustir.c,v 1.43 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.42 2019/09/22 07:28:35 dsainty Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ustir.c,v 1.43 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -215,16 +215,16 @@ ustir_dumpdata(uint8_t const *data, size_t dlen, char const *desc)
}
#endif
-int ustir_match(device_t, cfdata_t, void *);
-void ustir_attach(device_t, device_t, void *);
-void ustir_childdet(device_t, device_t);
-int ustir_detach(device_t, int);
-int ustir_activate(device_t, enum devact);
+static int ustir_match(device_t, cfdata_t, void *);
+static void ustir_attach(device_t, device_t, void *);
+static void ustir_childdet(device_t, device_t);
+static int ustir_detach(device_t, int);
+static int ustir_activate(device_t, enum devact);
CFATTACH_DECL2_NEW(ustir, sizeof(struct ustir_softc), ustir_match,
ustir_attach, ustir_detach, ustir_activate, NULL, ustir_childdet);
-int
+static int
ustir_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -238,7 +238,7 @@ ustir_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
ustir_attach(device_t parent, device_t self, void *aux)
{
struct ustir_softc *sc = device_private(self);
@@ -312,7 +312,7 @@ ustir_attach(device_t parent, device_t self, void *aux)
return;
}
-void
+static void
ustir_childdet(device_t self, device_t child)
{
struct ustir_softc *sc = device_private(self);
@@ -321,7 +321,7 @@ ustir_childdet(device_t self, device_t child)
sc->sc_child = NULL;
}
-int
+static int
ustir_detach(device_t self, int flags)
{
struct ustir_softc *sc = device_private(self);
diff --git a/sys/dev/usb/uthum.c b/sys/dev/usb/uthum.c
index 1adbd032a54..95e992f5b0a 100644
--- a/sys/dev/usb/uthum.c
+++ b/sys/dev/usb/uthum.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uthum.c,v 1.16 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: uthum.c,v 1.17 2019/12/01 08:27:54 maxv Exp $ */
/* $OpenBSD: uthum.c,v 1.6 2010/01/03 18:43:02 deraadt Exp $ */
/*
@@ -22,7 +22,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uthum.c,v 1.16 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uthum.c,v 1.17 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -59,9 +59,9 @@ int uthumdebug = 0;
#define CMD_DEVTYPE 0x52 /* XXX */
#define CMD_GETDATA 0x48 /* XXX */
#define CMD_GETTEMP 0x54 /* XXX */
-static uint8_t cmd_start[8] =
+static const uint8_t cmd_start[8] =
{ 0x0a, 0x0b, 0x0c, 0x0d, 0x00, 0x00, 0x02, 0x00 };
-static uint8_t cmd_end[8] =
+static const uint8_t cmd_end[8] =
{ 0x0a, 0x0b, 0x0c, 0x0d, 0x00, 0x00, 0x01, 0x00 };
/* sensors */
@@ -93,32 +93,31 @@ struct uthum_softc {
};
-const struct usb_devno uthum_devs[] = {
+static const struct usb_devno uthum_devs[] = {
/* XXX: various TEMPer variants using same VID/PID */
{ USB_VENDOR_TENX, USB_PRODUCT_TENX_TEMPER},
};
#define uthum_lookup(v, p) usb_lookup(uthum_devs, v, p)
-int uthum_match(device_t, cfdata_t, void *);
-void uthum_attach(device_t, device_t, void *);
-void uthum_childdet(device_t, device_t);
-int uthum_detach(device_t, int);
-int uthum_activate(device_t, enum devact);
+static int uthum_match(device_t, cfdata_t, void *);
+static void uthum_attach(device_t, device_t, void *);
+static int uthum_detach(device_t, int);
+static int uthum_activate(device_t, enum devact);
-int uthum_read_data(struct uthum_softc *, uint8_t, uint8_t *, size_t, int);
-int uthum_check_sensortype(struct uthum_softc *);
-int uthum_temper_temp(uint8_t, uint8_t);
-int uthum_sht1x_temp(uint8_t, uint8_t);
-int uthum_sht1x_rh(unsigned int, int);
+static int uthum_read_data(struct uthum_softc *, uint8_t, uint8_t *, size_t, int);
+static int uthum_check_sensortype(struct uthum_softc *);
+static int uthum_temper_temp(uint8_t, uint8_t);
+static int uthum_sht1x_temp(uint8_t, uint8_t);
+static int uthum_sht1x_rh(unsigned int, int);
-void uthum_intr(struct uhidev *, void *, u_int);
+static void uthum_intr(struct uhidev *, void *, u_int);
static void uthum_refresh(struct sysmon_envsys *, envsys_data_t *);
CFATTACH_DECL_NEW(uthum, sizeof(struct uthum_softc), uthum_match, uthum_attach,
uthum_detach, uthum_activate);
-int
+static int
uthum_match(device_t parent, cfdata_t match, void *aux)
{
struct uhidev_attach_arg *uha = aux;
@@ -127,7 +126,7 @@ uthum_match(device_t parent, cfdata_t match, void *aux)
!= NULL ? UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
-void
+static void
uthum_attach(device_t parent, device_t self, void *aux)
{
struct uthum_softc *sc = device_private(self);
@@ -220,7 +219,7 @@ uthum_attach(device_t parent, device_t self, void *aux)
DPRINTF(("uthum_attach: complete\n"));
}
-int
+static int
uthum_detach(device_t self, int flags)
{
struct uthum_softc *sc = device_private(self);
@@ -238,7 +237,7 @@ uthum_detach(device_t self, int flags)
return rv;
}
-int
+static int
uthum_activate(device_t self, enum devact act)
{
struct uthum_softc *sc = device_private(self);
@@ -251,13 +250,13 @@ uthum_activate(device_t self, enum devact act)
return 0;
}
-void
+static void
uthum_intr(struct uhidev *addr, void *ibuf, u_int len)
{
/* do nothing */
}
-int
+static int
uthum_read_data(struct uthum_softc *sc, uint8_t target_cmd, uint8_t *buf,
size_t len, int need_delay)
{
@@ -304,7 +303,7 @@ uthum_read_data(struct uthum_softc *sc, uint8_t target_cmd, uint8_t *buf,
return 0;
}
-int
+static int
uthum_check_sensortype(struct uthum_softc *sc)
{
uint8_t buf[8];
@@ -395,7 +394,7 @@ uthum_refresh(struct sysmon_envsys *sme, envsys_data_t *edata)
}
/* return C-degree * 100 value */
-int
+static int
uthum_temper_temp(uint8_t msb, uint8_t lsb)
{
int val;
@@ -409,7 +408,7 @@ uthum_temper_temp(uint8_t msb, uint8_t lsb)
}
/* return C-degree * 100 value */
-int
+static int
uthum_sht1x_temp(uint8_t msb, uint8_t lsb)
{
int val;
@@ -419,7 +418,7 @@ uthum_sht1x_temp(uint8_t msb, uint8_t lsb)
}
/* return %RH * 1000 */
-int
+static int
uthum_sht1x_rh(unsigned int ticks, int temp)
{
int rh_l, rh;
diff --git a/sys/dev/usb/utoppy.c b/sys/dev/usb/utoppy.c
index af640d76eb1..bcf0fe55840 100644
--- a/sys/dev/usb/utoppy.c
+++ b/sys/dev/usb/utoppy.c
@@ -1,4 +1,4 @@
-/* $NetBSD: utoppy.c,v 1.32 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: utoppy.c,v 1.33 2019/12/01 08:27:54 maxv Exp $ */
/*-
* Copyright (c) 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: utoppy.c,v 1.32 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: utoppy.c,v 1.33 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -179,11 +179,11 @@ struct utoppy_header {
#define UTOPPY_IN_DATA(sc) \
((void*)&(((uint8_t*)(sc)->sc_in_data)[(sc)->sc_in_offset+UTOPPY_HEADER_SIZE]))
-dev_type_open(utoppyopen);
-dev_type_close(utoppyclose);
-dev_type_read(utoppyread);
-dev_type_write(utoppywrite);
-dev_type_ioctl(utoppyioctl);
+static dev_type_open(utoppyopen);
+static dev_type_close(utoppyclose);
+static dev_type_read(utoppyread);
+static dev_type_write(utoppywrite);
+static dev_type_ioctl(utoppyioctl);
const struct cdevsw utoppy_cdevsw = {
.d_open = utoppyopen,
@@ -202,15 +202,15 @@ const struct cdevsw utoppy_cdevsw = {
#define UTOPPYUNIT(n) (minor(n))
-int utoppy_match(device_t, cfdata_t, void *);
-void utoppy_attach(device_t, device_t, void *);
-int utoppy_detach(device_t, int);
-int utoppy_activate(device_t, enum devact);
+static int utoppy_match(device_t, cfdata_t, void *);
+static void utoppy_attach(device_t, device_t, void *);
+static int utoppy_detach(device_t, int);
+static int utoppy_activate(device_t, enum devact);
CFATTACH_DECL_NEW(utoppy, sizeof(struct utoppy_softc), utoppy_match,
utoppy_attach, utoppy_detach, utoppy_activate);
-int
+static int
utoppy_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -222,7 +222,7 @@ utoppy_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
utoppy_attach(device_t parent, device_t self, void *aux)
{
struct utoppy_softc *sc = device_private(self);
@@ -341,7 +341,7 @@ utoppy_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
utoppy_activate(device_t self, enum devact act)
{
struct utoppy_softc *sc = device_private(self);
@@ -355,7 +355,7 @@ utoppy_activate(device_t self, enum devact act)
}
}
-int
+static int
utoppy_detach(device_t self, int flags)
{
struct utoppy_softc *sc = device_private(self);
@@ -1311,7 +1311,7 @@ utoppy_readfile_next(struct utoppy_softc *sc)
return 0;
}
-int
+static int
utoppyopen(dev_t dev, int flag, int mode,
struct lwp *l)
{
@@ -1361,7 +1361,7 @@ utoppyopen(dev_t dev, int flag, int mode,
return error;
}
-int
+static int
utoppyclose(dev_t dev, int flag, int mode, struct lwp *l)
{
struct utoppy_softc *sc;
@@ -1413,7 +1413,7 @@ utoppyclose(dev_t dev, int flag, int mode, struct lwp *l)
return 0;
}
-int
+static int
utoppyread(dev_t dev, struct uio *uio, int flags)
{
struct utoppy_softc *sc;
@@ -1494,7 +1494,7 @@ utoppyread(dev_t dev, struct uio *uio, int flags)
return err;
}
-int
+static int
utoppywrite(dev_t dev, struct uio *uio, int flags)
{
struct utoppy_softc *sc;
@@ -1599,7 +1599,7 @@ utoppywrite(dev_t dev, struct uio *uio, int flags)
return err;
}
-int
+static int
utoppyioctl(dev_t dev, u_long cmd, void *data, int flag,
struct lwp *l)
{
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index 962d84f15d5..0a9a385ecab 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvideo.c,v 1.52 2019/10/23 01:30:54 maya Exp $ */
+/* $NetBSD: uvideo.c,v 1.53 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2008 Patrick Mahoney
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.52 2019/10/23 01:30:54 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvideo.c,v 1.53 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -260,11 +260,11 @@ struct uvideo_softc {
char sc_businfo[32];
};
-int uvideo_match(device_t, cfdata_t, void *);
-void uvideo_attach(device_t, device_t, void *);
-int uvideo_detach(device_t, int);
-void uvideo_childdet(device_t, device_t);
-int uvideo_activate(device_t, enum devact);
+static int uvideo_match(device_t, cfdata_t, void *);
+static void uvideo_attach(device_t, device_t, void *);
+static int uvideo_detach(device_t, int);
+static void uvideo_childdet(device_t, device_t);
+static int uvideo_activate(device_t, enum devact);
static int uvideo_open(void *, int);
static void uvideo_close(void *);
@@ -466,7 +466,7 @@ static void print_vs_format_dv_descriptor(
} while (0)
-int
+static int
uvideo_match(device_t parent, cfdata_t match, void *aux)
{
struct usbif_attach_arg *uiaa = aux;
@@ -482,7 +482,7 @@ uvideo_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
uvideo_attach(device_t parent, device_t self, void *aux)
{
struct uvideo_softc *sc = device_private(self);
@@ -628,7 +628,7 @@ bad:
}
-int
+static int
uvideo_activate(device_t self, enum devact act)
{
struct uvideo_softc *sc = device_private(self);
@@ -645,7 +645,7 @@ uvideo_activate(device_t self, enum devact act)
/* Detach child (video interface) */
-void
+static void
uvideo_childdet(device_t self, device_t child)
{
struct uvideo_softc *sc = device_private(self);
@@ -655,7 +655,7 @@ uvideo_childdet(device_t self, device_t child)
}
-int
+static int
uvideo_detach(device_t self, int flags)
{
struct uvideo_softc *sc;
diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c
index 1fc983a91c8..160a1b15ec4 100644
--- a/sys/dev/usb/uvscom.c
+++ b/sys/dev/usb/uvscom.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uvscom.c,v 1.35 2019/05/09 02:43:35 mrg Exp $ */
+/* $NetBSD: uvscom.c,v 1.36 2019/12/01 08:27:54 maxv Exp $ */
/*-
* Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
* All rights reserved.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.35 2019/05/09 02:43:35 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uvscom.c,v 1.36 2019/12/01 08:27:54 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -188,7 +188,7 @@ static int uvscom_param(void *, int, struct termios *);
static int uvscom_open(void *, int);
static void uvscom_close(void *, int);
-struct ucom_methods uvscom_methods = {
+static const struct ucom_methods uvscom_methods = {
.ucom_get_status = uvscom_get_status,
.ucom_set = uvscom_set,
.ucom_param = uvscom_param,
@@ -211,15 +211,15 @@ static const struct usb_devno uvscom_devs [] = {
};
#define uvscom_lookup(v, p) usb_lookup(uvscom_devs, v, p)
-int uvscom_match(device_t, cfdata_t, void *);
-void uvscom_attach(device_t, device_t, void *);
-void uvscom_childdet(device_t, device_t);
-int uvscom_detach(device_t, int);
+static int uvscom_match(device_t, cfdata_t, void *);
+static void uvscom_attach(device_t, device_t, void *);
+static void uvscom_childdet(device_t, device_t);
+static int uvscom_detach(device_t, int);
CFATTACH_DECL2_NEW(uvscom, sizeof(struct uvscom_softc), uvscom_match,
uvscom_attach, uvscom_detach, NULL, NULL, uvscom_childdet);
-int
+static int
uvscom_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -228,7 +228,7 @@ uvscom_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
-void
+static void
uvscom_attach(device_t parent, device_t self, void *aux)
{
struct uvscom_softc *sc = device_private(self);
@@ -367,7 +367,7 @@ uvscom_attach(device_t parent, device_t self, void *aux)
return;
}
-void
+static void
uvscom_childdet(device_t self, device_t child)
{
struct uvscom_softc *sc = device_private(self);
@@ -391,7 +391,7 @@ uvscom_close_pipe(struct uvscom_softc *sc)
}
}
-int
+static int
uvscom_detach(device_t self, int flags)
{
struct uvscom_softc *sc = device_private(self);
diff --git a/sys/dev/usb/uyap.c b/sys/dev/usb/uyap.c
index 0f275c63a60..c6148d4d078 100644
--- a/sys/dev/usb/uyap.c
+++ b/sys/dev/usb/uyap.c
@@ -1,4 +1,4 @@
-/* $NetBSD: uyap.c,v 1.23 2019/05/05 03:17:54 mrg Exp $ */
+/* $NetBSD: uyap.c,v 1.24 2019/12/01 08:27:54 maxv Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uyap.c,v 1.23 2019/05/05 03:17:54 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uyap.c,v 1.24 2019/12/01 08:27:54 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -44,24 +44,24 @@ __KERNEL_RCSID(0, "$NetBSD: uyap.c,v 1.23 2019/05/05 03:17:54 mrg Exp $");
#include <dev/usb/ezload.h>
-const struct ezdata uyap_firmware[] = {
+static const struct ezdata uyap_firmware[] = {
#include "dev/usb/uyap_firmware.h"
};
-const struct ezdata *uyap_firmwares[] = { uyap_firmware, NULL };
+static const struct ezdata *uyap_firmwares[] = { uyap_firmware, NULL };
struct uyap_softc {
device_t sc_dev; /* base device */
};
-int uyap_match(device_t, cfdata_t, void *);
-void uyap_attach(device_t, device_t, void *);
-int uyap_detach(device_t, int);
-int uyap_activate(device_t, enum devact);
+static int uyap_match(device_t, cfdata_t, void *);
+static void uyap_attach(device_t, device_t, void *);
+static int uyap_detach(device_t, int);
+static int uyap_activate(device_t, enum devact);
CFATTACH_DECL_NEW(uyap, sizeof(struct uyap_softc), uyap_match, uyap_attach,
uyap_detach, uyap_activate);
-int
+static int
uyap_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@@ -74,7 +74,7 @@ uyap_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
-void
+static void
uyap_attach(device_t parent, device_t self, void *aux)
{
struct uyap_softc *sc = device_private(self);
@@ -106,7 +106,7 @@ uyap_attach(device_t parent, device_t self, void *aux)
return;
}
-int
+static int
uyap_detach(device_t self, int flags)
{
#if 0
@@ -116,7 +116,7 @@ uyap_detach(device_t self, int flags)
return 0;
}
-int
+static int
uyap_activate(device_t self, enum devact act)
{
return 0;