Localify, constify.

This commit is contained in:
maxv 2020-01-07 06:42:26 +00:00
parent 901c37140c
commit f76a68287e
29 changed files with 174 additions and 177 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_aue.c,v 1.161 2019/08/23 04:34:51 mrg Exp $ */
/* $NetBSD: if_aue.c,v 1.162 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@ -76,7 +76,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.161 2019/08/23 04:34:51 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_aue.c,v 1.162 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -231,8 +231,8 @@ static const struct aue_type aue_devs[] = {
};
#define aue_lookup(v, p) ((const struct aue_type *)usb_lookup(aue_devs, v, p))
int aue_match(device_t, cfdata_t, void *);
void aue_attach(device_t, device_t, void *);
static int aue_match(device_t, cfdata_t, void *);
static void aue_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(aue, sizeof(struct aue_softc), aue_match, aue_attach,
usbnet_detach, usbnet_activate);
@ -250,7 +250,7 @@ static void aue_rx_loop(struct usbnet *, struct usbnet_chain *, uint32_t);
static int aue_init(struct ifnet *);
static void aue_intr(struct usbnet *, usbd_status);
static struct usbnet_ops aue_ops = {
static const struct usbnet_ops aue_ops = {
.uno_stop = aue_stop_cb,
.uno_ioctl = aue_ioctl_cb,
.uno_read_reg = aue_mii_read_reg,
@ -742,7 +742,7 @@ aue_reset(struct aue_softc *sc)
/*
* Probe for a Pegasus chip.
*/
int
static int
aue_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -775,7 +775,7 @@ aue_match(device_t parent, cfdata_t match, void *aux)
* Attach the interface. Allocate softc structures, do ifmedia
* setup and ethernet/BPF attach.
*/
void
static void
aue_attach(device_t parent, device_t self, void *aux)
{
USBNET_MII_DECL_DEFAULT(unm);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_axe.c,v 1.120 2019/08/26 17:26:33 rin Exp $ */
/* $NetBSD: if_axe.c,v 1.121 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
/*
@ -87,7 +87,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.120 2019/08/26 17:26:33 rin Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.121 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -250,8 +250,8 @@ static const struct ax88772b_mfb ax88772b_mfb_table[] = {
{ 0x8700, 0x8A3D, 32768 }
};
int axe_match(device_t, cfdata_t, void *);
void axe_attach(device_t, device_t, void *);
static int axe_match(device_t, cfdata_t, void *);
static void axe_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(axe, sizeof(struct axe_softc),
axe_match, axe_attach, usbnet_detach, usbnet_activate);
@ -271,7 +271,7 @@ static void axe_ax88772_init(struct axe_softc *);
static void axe_ax88772a_init(struct axe_softc *);
static void axe_ax88772b_init(struct axe_softc *);
static struct usbnet_ops axe_ops = {
static const struct usbnet_ops axe_ops = {
.uno_stop = axe_stop,
.uno_ioctl = axe_ioctl,
.uno_read_reg = axe_mii_read_reg,
@ -846,7 +846,7 @@ axe_ax88772b_init(struct axe_softc *sc)
/*
* Probe for a AX88172 chip.
*/
int
static int
axe_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -859,7 +859,7 @@ axe_match(device_t parent, cfdata_t match, void *aux)
* Attach the interface. Allocate softc structures, do ifmedia
* setup and ethernet/BPF attach.
*/
void
static void
axe_attach(device_t parent, device_t self, void *aux)
{
AXEHIST_FUNC(); AXEHIST_CALLED();

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_axen.c,v 1.67 2019/08/23 04:32:57 mrg Exp $ */
/* $NetBSD: if_axen.c,v 1.68 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: if_axen.c,v 1.3 2013/10/21 10:10:22 yuo Exp $ */
/*
@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.67 2019/08/23 04:32:57 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_axen.c,v 1.68 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -88,7 +88,7 @@ static unsigned axen_tx_prepare(struct usbnet *, struct mbuf *,
struct usbnet_chain *);
static int axen_init(struct ifnet *);
static struct usbnet_ops axen_ops = {
static const struct usbnet_ops axen_ops = {
.uno_stop = axen_stop_cb,
.uno_ioctl = axen_ioctl_cb,
.uno_read_reg = axen_mii_read_reg,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cdce.c,v 1.67 2019/08/20 06:37:06 mrg Exp $ */
/* $NetBSD: if_cdce.c,v 1.68 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.67 2019/08/20 06:37:06 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cdce.c,v 1.68 2020/01/07 06:42:26 maxv Exp $");
#include <sys/param.h>
@ -83,7 +83,7 @@ static unsigned cdce_tx_prepare(struct usbnet *, struct mbuf *,
struct usbnet_chain *);
static int cdce_init(struct ifnet *);
static struct usbnet_ops cdce_ops = {
static const struct usbnet_ops cdce_ops = {
.uno_tx_prepare = cdce_tx_prepare,
.uno_rx_loop = cdce_rx_loop,
.uno_init = cdce_init,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_cue.c,v 1.87 2019/12/27 09:41:51 msaitoh Exp $ */
/* $NetBSD: if_cue.c,v 1.88 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.87 2019/12/27 09:41:51 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_cue.c,v 1.88 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -124,7 +124,7 @@ struct cue_softc {
/*
* Various supported device vendors/products.
*/
static struct usb_devno cue_devs[] = {
static const struct usb_devno cue_devs[] = {
{ USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE },
{ USB_VENDOR_CATC, USB_PRODUCT_CATC_NETMATE2 },
{ USB_VENDOR_SMARTBRIDGES, USB_PRODUCT_SMARTBRIDGES_SMARTLINK },
@ -132,8 +132,8 @@ static struct usb_devno cue_devs[] = {
};
#define cue_lookup(v, p) (usb_lookup(cue_devs, v, p))
int cue_match(device_t, cfdata_t, void *);
void cue_attach(device_t, device_t, void *);
static int cue_match(device_t, cfdata_t, void *);
static void cue_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(cue, sizeof(struct cue_softc), cue_match, cue_attach,
usbnet_detach, usbnet_activate);
@ -146,7 +146,7 @@ static void cue_stop_cb(struct ifnet *, int);
static int cue_init(struct ifnet *);
static void cue_tick(struct usbnet *);
static struct usbnet_ops cue_ops = {
static const struct usbnet_ops cue_ops = {
.uno_stop = cue_stop_cb,
.uno_ioctl = cue_ioctl_cb,
.uno_tx_prepare = cue_tx_prepare,
@ -443,7 +443,7 @@ cue_reset(struct usbnet *un)
/*
* Probe for a CATC chip.
*/
int
static int
cue_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -456,7 +456,7 @@ cue_match(device_t parent, cfdata_t match, void *aux)
* Attach the interface. Allocate softc structures, do ifmedia
* setup and ethernet/BPF attach.
*/
void
static void
cue_attach(device_t parent, device_t self, void *aux)
{
struct cue_softc *sc = device_private(self);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_kue.c,v 1.100 2019/08/20 06:37:06 mrg Exp $ */
/* $NetBSD: if_kue.c,v 1.101 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.100 2019/08/20 06:37:06 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_kue.c,v 1.101 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -164,9 +164,9 @@ static const struct usb_devno kue_devs[] = {
};
#define kue_lookup(v, p) (usb_lookup(kue_devs, v, p))
int kue_match(device_t, cfdata_t, void *);
void kue_attach(device_t, device_t, void *);
int kue_detach(device_t, int);
static int kue_match(device_t, cfdata_t, void *);
static void kue_attach(device_t, device_t, void *);
static int kue_detach(device_t, int);
CFATTACH_DECL_NEW(kue, sizeof(struct kue_softc), kue_match, kue_attach,
kue_detach, usbnet_activate);
@ -177,7 +177,7 @@ static unsigned kue_tx_prepare(struct usbnet *, struct mbuf *,
static int kue_ioctl_cb(struct ifnet *, u_long, void *);
static int kue_init(struct ifnet *);
static struct usbnet_ops kue_ops = {
static const struct usbnet_ops kue_ops = {
.uno_ioctl = kue_ioctl_cb,
.uno_tx_prepare = kue_tx_prepare,
.uno_rx_loop = kue_rx_loop,
@ -395,7 +395,7 @@ kue_reset(struct usbnet *un)
/*
* Probe for a KLSI chip.
*/
int
static int
kue_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -410,7 +410,7 @@ kue_match(device_t parent, cfdata_t match, void *aux)
* Attach the interface. Allocate softc structures, do
* setup and ethernet/BPF attach.
*/
void
static void
kue_attach(device_t parent, device_t self, void *aux)
{
struct kue_softc *sc = device_private(self);
@ -513,7 +513,7 @@ kue_attach(device_t parent, device_t self, void *aux)
0, NULL);
}
int
static int
kue_detach(device_t self, int flags)
{
struct kue_softc *sc = device_private(self);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mos.c,v 1.2 2020/01/06 15:19:00 msaitoh Exp $ */
/* $NetBSD: if_mos.c,v 1.3 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: if_mos.c,v 1.40 2019/07/07 06:40:10 kevlo Exp $ */
/*
@ -72,7 +72,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.2 2020/01/06 15:19:00 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.3 2020/01/07 06:42:26 maxv Exp $");
#include <sys/param.h>
@ -128,7 +128,7 @@ int mosdebug = 0;
/*
* Various supported device vendors/products.
*/
const struct mos_type mos_devs[] = {
static const struct mos_type mos_devs[] = {
{ { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7730 }, MCS7730 },
{ { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7830 }, MCS7830 },
{ { USB_VENDOR_MOSCHIP, USB_PRODUCT_MOSCHIP_MCS7832 }, MCS7832 },
@ -162,7 +162,7 @@ static int mos_readmac(struct usbnet *);
static int mos_writemac(struct usbnet *);
static int mos_write_mcast(struct usbnet *, uint8_t *);
static struct usbnet_ops mos_ops = {
static const struct usbnet_ops mos_ops = {
.uno_stop = mos_stop,
.uno_ioctl = mos_ioctl,
.uno_read_reg = mos_mii_read_reg,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_mue.c,v 1.55 2019/08/23 04:32:57 mrg Exp $ */
/* $NetBSD: if_mue.c,v 1.56 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: if_mue.c,v 1.3 2018/08/04 16:42:46 jsg Exp $ */
/*
@ -20,7 +20,7 @@
/* Driver for Microchip LAN7500/LAN7800 chipsets. */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.55 2019/08/23 04:32:57 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_mue.c,v 1.56 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -60,7 +60,7 @@ struct mue_type {
#define LAN7850 0x0008 /* LAN7850 */
};
const struct mue_type mue_devs[] = {
static const struct mue_type mue_devs[] = {
{ { USB_VENDOR_SMSC, USB_PRODUCT_SMSC_LAN7500 }, LAN7500 },
{ { USB_VENDOR_SMSC, USB_PRODUCT_SMSC_LAN7505 }, LAN7500 },
{ { USB_VENDOR_SMSC, USB_PRODUCT_SMSC_LAN7800 }, LAN7800 },
@ -107,7 +107,7 @@ static unsigned mue_tx_prepare(struct usbnet *, struct mbuf *,
struct usbnet_chain *);
static int mue_init(struct ifnet *);
static struct usbnet_ops mue_ops = {
static const struct usbnet_ops mue_ops = {
.uno_stop = mue_stop_cb,
.uno_ioctl = mue_ioctl_cb,
.uno_read_reg = mue_mii_read_reg,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_smsc.c,v 1.61 2019/08/23 04:32:57 mrg Exp $ */
/* $NetBSD: if_smsc.c,v 1.62 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: if_smsc.c,v 1.4 2012/09/27 12:38:11 jsg Exp $ */
/* $FreeBSD: src/sys/dev/usb/net/if_smsc.c,v 1.1 2012/08/15 04:03:55 gonzo Exp $ */
@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.61 2019/08/23 04:32:57 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_smsc.c,v 1.62 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -164,26 +164,25 @@ fail:
printf("%s: error: " fmt, device_xname((un)->un_dev), ##args)
/* Function declarations */
int smsc_match(device_t, cfdata_t, void *);
void smsc_attach(device_t, device_t, void *);
static int smsc_match(device_t, cfdata_t, void *);
static void smsc_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(usmsc, sizeof(struct smsc_softc),
smsc_match, smsc_attach, usbnet_detach, usbnet_activate);
int smsc_chip_init(struct usbnet *);
int smsc_setmacaddress(struct usbnet *, const uint8_t *);
static int smsc_chip_init(struct usbnet *);
static int smsc_setmacaddress(struct usbnet *, const uint8_t *);
int smsc_init(struct ifnet *);
int smsc_init_locked(struct ifnet *);
int smsc_ioctl(struct ifnet *, u_long, void *);
void smsc_stop_cb(struct ifnet *, int);
static int smsc_init(struct ifnet *);
static int smsc_init_locked(struct ifnet *);
static void smsc_stop_cb(struct ifnet *, int);
void smsc_reset(struct smsc_softc *);
static void smsc_reset(struct smsc_softc *);
static void smsc_miibus_statchg(struct ifnet *);
int smsc_readreg(struct usbnet *, uint32_t, uint32_t *);
int smsc_writereg(struct usbnet *, uint32_t, uint32_t);
int smsc_wait_for_bits(struct usbnet *, uint32_t, uint32_t);
static int smsc_readreg(struct usbnet *, uint32_t, uint32_t *);
static int smsc_writereg(struct usbnet *, uint32_t, uint32_t);
static int smsc_wait_for_bits(struct usbnet *, uint32_t, uint32_t);
static int smsc_miibus_readreg(struct usbnet *, int, int, uint16_t *);
static int smsc_miibus_writereg(struct usbnet *, int, int, uint16_t);
@ -192,7 +191,7 @@ static unsigned smsc_tx_prepare(struct usbnet *, struct mbuf *,
struct usbnet_chain *);
static void smsc_rx_loop(struct usbnet *, struct usbnet_chain *, uint32_t);
static struct usbnet_ops smsc_ops = {
static const struct usbnet_ops smsc_ops = {
.uno_stop = smsc_stop_cb,
.uno_ioctl = smsc_ioctl_cb,
.uno_read_reg = smsc_miibus_readreg,
@ -203,7 +202,7 @@ static struct usbnet_ops smsc_ops = {
.uno_init = smsc_init,
};
int
static int
smsc_readreg(struct usbnet *un, uint32_t off, uint32_t *data)
{
usb_device_request_t req;
@ -230,7 +229,7 @@ smsc_readreg(struct usbnet *un, uint32_t off, uint32_t *data)
return err;
}
int
static int
smsc_writereg(struct usbnet *un, uint32_t off, uint32_t data)
{
usb_device_request_t req;
@ -257,7 +256,7 @@ smsc_writereg(struct usbnet *un, uint32_t off, uint32_t data)
return err;
}
int
static int
smsc_wait_for_bits(struct usbnet *un, uint32_t reg, uint32_t bits)
{
uint32_t val;
@ -332,7 +331,7 @@ smsc_miibus_writereg(struct usbnet *un, int phy, int reg, uint16_t val)
return 0;
}
void
static void
smsc_miibus_statchg(struct ifnet *ifp)
{
USMSCHIST_FUNC(); USMSCHIST_CALLED();
@ -533,7 +532,7 @@ smsc_setoe(struct usbnet *un)
}
int
static int
smsc_setmacaddress(struct usbnet *un, const uint8_t *addr)
{
USMSCHIST_FUNC(); USMSCHIST_CALLED();
@ -556,7 +555,7 @@ done:
return err;
}
void
static void
smsc_reset(struct smsc_softc *sc)
{
struct usbnet * const un = &sc->smsc_un;
@ -572,7 +571,7 @@ smsc_reset(struct smsc_softc *sc)
smsc_chip_init(un);
}
int
static int
smsc_init(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
@ -584,7 +583,7 @@ smsc_init(struct ifnet *ifp)
return ret;
}
int
static int
smsc_init_locked(struct ifnet *ifp)
{
struct usbnet * const un = ifp->if_softc;
@ -612,7 +611,7 @@ smsc_init_locked(struct ifnet *ifp)
return usbnet_init_rx_tx(un);
}
void
static void
smsc_stop_cb(struct ifnet *ifp, int disable)
{
struct usbnet * const un = ifp->if_softc;
@ -622,7 +621,7 @@ smsc_stop_cb(struct ifnet *ifp, int disable)
smsc_reset(sc);
}
int
static int
smsc_chip_init(struct usbnet *un)
{
struct smsc_softc * const sc = usbnet_softc(un);
@ -797,7 +796,7 @@ smsc_ioctl_cb(struct ifnet *ifp, u_long cmd, void *data)
return 0;
}
int
static int
smsc_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -806,7 +805,7 @@ smsc_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
void
static void
smsc_attach(device_t parent, device_t self, void *aux)
{
USBNET_MII_DECL_DEFAULT(unm);
@ -936,7 +935,7 @@ smsc_attach(device_t parent, device_t self, void *aux)
0, &unm);
}
void
static void
smsc_rx_loop(struct usbnet * un, struct usbnet_chain *c, uint32_t total_len)
{
USMSCHIST_FUNC(); USMSCHIST_CALLED();

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_udav.c,v 1.72 2019/10/07 09:37:16 skrll Exp $ */
/* $NetBSD: if_udav.c,v 1.73 2020/01/07 06:42:26 maxv Exp $ */
/* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */
/*
@ -45,7 +45,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.72 2019/10/07 09:37:16 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.73 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -57,8 +57,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_udav.c,v 1.72 2019/10/07 09:37:16 skrll Exp $");
#include <dev/usb/if_udavreg.h>
/* Function declarations */
int udav_match(device_t, cfdata_t, void *);
void udav_attach(device_t, device_t, void *);
static int udav_match(device_t, cfdata_t, void *);
static void udav_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(udav, sizeof(struct usbnet), udav_match, udav_attach,
usbnet_detach, usbnet_activate);
@ -131,7 +131,7 @@ static const struct udav_type {
};
#define udav_lookup(v, p) ((const struct udav_type *)usb_lookup(udav_devs, v, p))
static struct usbnet_ops udav_ops = {
static const struct usbnet_ops udav_ops = {
.uno_stop = udav_stop_cb,
.uno_ioctl = udav_ioctl_cb,
.uno_read_reg = udav_mii_read_reg,
@ -143,7 +143,7 @@ static struct usbnet_ops udav_ops = {
};
/* Probe */
int
static int
udav_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -153,7 +153,7 @@ udav_match(device_t parent, cfdata_t match, void *aux)
}
/* Attach */
void
static void
udav_attach(device_t parent, device_t self, void *aux)
{
USBNET_MII_DECL_DEFAULT(unm);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_upl.c,v 1.68 2019/09/13 07:47:39 msaitoh Exp $ */
/* $NetBSD: if_upl.c,v 1.69 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.68 2019/09/13 07:47:39 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_upl.c,v 1.69 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -90,7 +90,7 @@ int upldebug = 0;
/*
* Various supported device vendors/products.
*/
static struct usb_devno sc_devs[] = {
static const struct usb_devno sc_devs[] = {
{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301 },
{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302 },
{ USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL25A1 },
@ -98,8 +98,8 @@ static struct usb_devno sc_devs[] = {
{ USB_VENDOR_NI, USB_PRODUCT_NI_HTOH_7825 }
};
int upl_match(device_t, cfdata_t, void *);
void upl_attach(device_t, device_t, void *);
static int upl_match(device_t, cfdata_t, void *);
static void upl_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(upl, sizeof(struct usbnet), upl_match, upl_attach,
usbnet_detach, usbnet_activate);
@ -113,7 +113,7 @@ static unsigned upl_tx_prepare(struct usbnet *, struct mbuf *,
static int upl_ioctl_cb(struct ifnet *, u_long, void *);
static int upl_init(struct ifnet *);
static struct usbnet_ops upl_ops = {
static const struct usbnet_ops upl_ops = {
.uno_init = upl_init,
.uno_tx_prepare = upl_tx_prepare,
.uno_rx_loop = upl_rx_loop,
@ -130,7 +130,7 @@ static void upl_input(struct ifnet *, struct mbuf *);
/*
* Probe for a Prolific chip.
*/
int
static int
upl_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -139,7 +139,7 @@ upl_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
void
static void
upl_attach(device_t parent, device_t self, void *aux)
{
struct usbnet * const un = device_private(self);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_ure.c,v 1.33 2019/10/16 13:11:16 bad Exp $ */
/* $NetBSD: if_ure.c,v 1.34 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: if_ure.c,v 1.10 2018/11/02 21:32:30 jcs Exp $ */
/*-
@ -30,7 +30,7 @@
/* RealTek RTL8152/RTL8153 10/100/Gigabit USB Ethernet device */
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.33 2019/10/16 13:11:16 bad Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.34 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -101,7 +101,7 @@ static void ure_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(ure, sizeof(struct usbnet), ure_match, ure_attach,
usbnet_detach, usbnet_activate);
static struct usbnet_ops ure_ops = {
static const struct usbnet_ops ure_ops = {
.uno_stop = ure_stop_cb,
.uno_ioctl = ure_ioctl_cb,
.uno_read_reg = ure_mii_read_reg,

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_url.c,v 1.71 2019/08/30 05:59:17 mrg Exp $ */
/* $NetBSD: if_url.c,v 1.72 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 2001, 2002
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.71 2019/08/30 05:59:17 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.72 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_inet.h"
@ -66,8 +66,8 @@ __KERNEL_RCSID(0, "$NetBSD: if_url.c,v 1.71 2019/08/30 05:59:17 mrg Exp $");
#include <dev/usb/if_urlreg.h>
/* Function declarations */
int url_match(device_t, cfdata_t, void *);
void url_attach(device_t, device_t, void *);
static int url_match(device_t, cfdata_t, void *);
static void url_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(url, sizeof(struct usbnet), url_match, url_attach,
usbnet_detach, usbnet_activate);
@ -92,7 +92,7 @@ static int url_csr_write_2(struct usbnet *, int, int);
static int url_csr_write_4(struct usbnet *, int, int);
static int url_mem(struct usbnet *, int, int, void *, int);
static struct usbnet_ops url_ops = {
static const struct usbnet_ops url_ops = {
.uno_stop = url_stop_cb,
.uno_ioctl = url_ioctl_cb,
.uno_read_reg = url_int_mii_read_reg,
@ -145,7 +145,7 @@ static const struct url_type {
/* Probe */
int
static int
url_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -154,7 +154,7 @@ url_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
/* Attach */
void
static void
url_attach(device_t parent, device_t self, void *aux)
{
USBNET_MII_DECL_DEFAULT(unm);

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_urndis.c,v 1.34 2019/10/31 11:59:40 maya Exp $ */
/* $NetBSD: if_urndis.c,v 1.35 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: if_urndis.c,v 1.31 2011/07/03 15:47:17 matthew Exp $ */
/*
@ -21,7 +21,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.34 2019/10/31 11:59:40 maya Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_urndis.c,v 1.35 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -88,7 +88,7 @@ static uint32_t urndis_ctrl_set(struct usbnet *, uint32_t, void *,
static int urndis_match(device_t, cfdata_t, void *);
static void urndis_attach(device_t, device_t, void *);
static struct usbnet_ops urndis_ops = {
static const struct usbnet_ops urndis_ops = {
.uno_init = urndis_init,
.uno_tx_prepare = urndis_tx_prepare,
.uno_rx_loop = urndis_rx_loop,

View File

@ -1,4 +1,4 @@
/* $NetBSD: u3g.c,v 1.37 2019/05/09 02:43:35 mrg Exp $ */
/* $NetBSD: u3g.c,v 1.38 2020/01/07 06:42:26 maxv Exp $ */
/*-
* Copyright (c) 2009 The NetBSD Foundation, Inc.
@ -50,7 +50,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.37 2019/05/09 02:43:35 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: u3g.c,v 1.38 2020/01/07 06:42:26 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -162,7 +162,7 @@ static void u3g_close(void *, int);
static void u3g_read(void *, int, u_char **, uint32_t *);
static void u3g_write(void *, int, u_char *, u_char *, uint32_t *);
struct ucom_methods u3g_methods = {
static const struct ucom_methods u3g_methods = {
.ucom_get_status = u3g_get_status,
.ucom_set = u3g_set,
.ucom_open = u3g_open,

View File

@ -1,4 +1,4 @@
/* $NetBSD: uark.c,v 1.15 2019/05/09 02:43:35 mrg Exp $ */
/* $NetBSD: uark.c,v 1.16 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: uark.c,v 1.13 2009/10/13 19:33:17 pirofti Exp $ */
/*
@ -18,7 +18,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uark.c,v 1.15 2019/05/09 02:43:35 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: uark.c,v 1.16 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -85,7 +85,7 @@ static int uark_open(void *, int);
static void uark_break(void *, int, int);
static int uark_cmd(struct uark_softc *, uint16_t, uint16_t);
struct ucom_methods uark_methods = {
static const struct ucom_methods uark_methods = {
.ucom_get_status = uark_get_status,
.ucom_set = uark_set,
.ucom_param = uark_param,

View File

@ -1,4 +1,4 @@
/* $NetBSD: ubsa.c,v 1.38 2019/05/09 02:43:35 mrg Exp $ */
/* $NetBSD: ubsa.c,v 1.39 2020/01/07 06:42:26 maxv Exp $ */
/*-
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
@ -55,7 +55,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.38 2019/05/09 02:43:35 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: ubsa.c,v 1.39 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -99,7 +99,7 @@ int ubsadebug = 0;
#endif
#define DPRINTF(x) DPRINTFN(0, x)
struct ucom_methods ubsa_methods = {
static const struct ucom_methods ubsa_methods = {
.ucom_get_status = ubsa_get_status,
.ucom_set = ubsa_set,
.ucom_param = ubsa_param,

View File

@ -1,4 +1,4 @@
/* $NetBSD: uchcom.c,v 1.33 2019/05/09 02:43:35 mrg Exp $ */
/* $NetBSD: uchcom.c,v 1.34 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 2007 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.33 2019/05/09 02:43:35 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: uchcom.c,v 1.34 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -185,7 +185,7 @@ static int find_endpoints(struct uchcom_softc *,
static void close_intr_pipe(struct uchcom_softc *);
struct ucom_methods uchcom_methods = {
static const struct ucom_methods uchcom_methods = {
.ucom_get_status = uchcom_get_status,
.ucom_set = uchcom_set,
.ucom_param = uchcom_param,

View File

@ -1,4 +1,4 @@
/* $NetBSD: uftdi.c,v 1.71 2019/09/13 20:50:45 ryo Exp $ */
/* $NetBSD: uftdi.c,v 1.72 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.71 2019/09/13 20:50:45 ryo Exp $");
__KERNEL_RCSID(0, "$NetBSD: uftdi.c,v 1.72 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -110,7 +110,7 @@ static void uftdi_read(void *, int, u_char **, uint32_t *);
static void uftdi_write(void *, int, u_char *, u_char *, uint32_t *);
static void uftdi_break(void *, int, int);
struct ucom_methods uftdi_methods = {
static const struct ucom_methods uftdi_methods = {
.ucom_get_status = uftdi_get_status,
.ucom_set = uftdi_set,
.ucom_param = uftdi_param,

View File

@ -1,4 +1,4 @@
/* $NetBSD: uhub.c,v 1.143 2019/08/21 10:48:37 mrg Exp $ */
/* $NetBSD: uhub.c,v 1.144 2020/01/07 06:42:26 maxv Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
/* $OpenBSD: uhub.c,v 1.86 2015/06/29 18:27:40 mpi Exp $ */
@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.143 2019/08/21 10:48:37 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: uhub.c,v 1.144 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -137,11 +137,11 @@ Static void uhub_intr(struct usbd_xfer *, void *, usbd_status);
* Every other driver only connects to hubs
*/
int uhub_match(device_t, cfdata_t, void *);
void uhub_attach(device_t, device_t, void *);
int uhub_rescan(device_t, const char *, const int *);
void uhub_childdet(device_t, device_t);
int uhub_detach(device_t, int);
static int uhub_match(device_t, cfdata_t, void *);
static void uhub_attach(device_t, device_t, void *);
static int uhub_rescan(device_t, const char *, const int *);
static void uhub_childdet(device_t, device_t);
static int uhub_detach(device_t, int);
CFATTACH_DECL3_NEW(uhub, sizeof(struct uhub_softc), uhub_match,
uhub_attach, uhub_detach, NULL, uhub_rescan, uhub_childdet,
@ -227,7 +227,7 @@ usbd_set_hub_depth(struct usbd_device *dev, int depth)
return usbd_do_request(dev, &req, 0);
}
int
static int
uhub_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -250,7 +250,7 @@ uhub_match(device_t parent, cfdata_t match, void *aux)
return UMATCH_NONE;
}
void
static void
uhub_attach(device_t parent, device_t self, void *aux)
{
struct uhub_softc *sc = device_private(self);
@ -805,7 +805,7 @@ uhub_explore(struct usbd_device *dev)
* Called from process context when the hub is gone.
* Detach all devices on active ports.
*/
int
static int
uhub_detach(device_t self, int flags)
{
struct uhub_softc *sc = device_private(self);
@ -864,7 +864,7 @@ uhub_detach(device_t self, int flags)
return 0;
}
int
static int
uhub_rescan(device_t self, const char *ifattr, const int *locators)
{
struct uhub_softc *sc = device_private(self);
@ -882,7 +882,7 @@ uhub_rescan(device_t self, const char *ifattr, const int *locators)
}
/* Called when a device has been detached from it */
void
static void
uhub_childdet(device_t self, device_t child)
{
struct uhub_softc *sc = device_private(self);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipad.c,v 1.8 2019/12/15 16:48:27 tsutsui Exp $ */
/* $NetBSD: uipad.c,v 1.9 2020/01/07 06:42:26 maxv Exp $ */
/*-
* Copyright (c) 2011 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipad.c,v 1.8 2019/12/15 16:48:27 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipad.c,v 1.9 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -88,11 +88,9 @@ static const struct usb_devno uipad_devs[] = {
#define uipad_lookup(v, p) usb_lookup(uipad_devs, v, p)
int uipad_match(device_t, cfdata_t, void *);
void uipad_attach(device_t, device_t, void *);
int uipad_detach(device_t, int);
int uipad_activate(device_t, enum devact);
static int uipad_match(device_t, cfdata_t, void *);
static void uipad_attach(device_t, device_t, void *);
static int uipad_detach(device_t, int);
CFATTACH_DECL_NEW(uipad, sizeof(struct uipad_softc), uipad_match,
uipad_attach, uipad_detach, NULL);
@ -124,7 +122,7 @@ uipad_charge(struct uipad_softc *sc)
uipad_cmd(sc, UT_VENDOR | UT_WRITE, 0x40, 0x6400, 0x6400);
}
int
static int
uipad_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -134,7 +132,7 @@ uipad_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
void
static void
uipad_attach(device_t parent, device_t self, void *aux)
{
struct uipad_softc *sc = device_private(self);
@ -165,7 +163,7 @@ uipad_attach(device_t parent, device_t self, void *aux)
return;
}
int
static int
uipad_detach(device_t self, int flags)
{
struct uipad_softc *sc = device_private(self);

View File

@ -1,4 +1,4 @@
/* $NetBSD: uipaq.c,v 1.26 2019/09/14 12:46:00 maxv Exp $ */
/* $NetBSD: uipaq.c,v 1.27 2020/01/07 06:42:26 maxv Exp $ */
/* $OpenBSD: uipaq.c,v 1.1 2005/06/17 23:50:33 deraadt Exp $ */
/*
@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.26 2019/09/14 12:46:00 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: uipaq.c,v 1.27 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -105,7 +105,7 @@ static void uipaq_rts(struct uipaq_softc *, int);
static void uipaq_break(struct uipaq_softc *, int);
struct ucom_methods uipaq_methods = {
static const struct ucom_methods uipaq_methods = {
.ucom_set = uipaq_set,
.ucom_open = uipaq_open,
};
@ -126,15 +126,15 @@ static const struct uipaq_type uipaq_devs[] = {
#define uipaq_lookup(v, p) ((const struct uipaq_type *)usb_lookup(uipaq_devs, v, p))
int uipaq_match(device_t, cfdata_t, void *);
void uipaq_attach(device_t, device_t, void *);
void uipaq_childdet(device_t, device_t);
int uipaq_detach(device_t, int);
static int uipaq_match(device_t, cfdata_t, void *);
static void uipaq_attach(device_t, device_t, void *);
static void uipaq_childdet(device_t, device_t);
static int uipaq_detach(device_t, int);
CFATTACH_DECL2_NEW(uipaq, sizeof(struct uipaq_softc), uipaq_match,
uipaq_attach, uipaq_detach, NULL, NULL, uipaq_childdet);
int
static int
uipaq_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -146,7 +146,7 @@ uipaq_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
void
static void
uipaq_attach(device_t parent, device_t self, void *aux)
{
struct uipaq_softc *sc = device_private(self);
@ -375,7 +375,7 @@ uipaq_open(void *arg, int portno)
return 0;
}
void
static void
uipaq_childdet(device_t self, device_t child)
{
struct uipaq_softc *sc = device_private(self);
@ -384,7 +384,7 @@ uipaq_childdet(device_t self, device_t child)
sc->sc_subdev = NULL;
}
int
static int
uipaq_detach(device_t self, int flags)
{
struct uipaq_softc *sc = device_private(self);

View File

@ -1,4 +1,4 @@
/* $NetBSD: ukyopon.c,v 1.24 2019/05/09 02:43:35 mrg Exp $ */
/* $NetBSD: ukyopon.c,v 1.25 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 1998, 2005 The NetBSD Foundation, Inc.
@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.24 2019/05/09 02:43:35 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: ukyopon.c,v 1.25 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -93,7 +93,7 @@ static int ukyopon_param(void *, int, struct termios *);
static int ukyopon_open(void *, int);
static void ukyopon_close(void *, int);
static struct ucom_methods ukyopon_methods = {
static const struct ucom_methods ukyopon_methods = {
.ucom_get_status = ukyopon_get_status,
.ucom_set = ukyopon_set,
.ucom_param = ukyopon_param,

View File

@ -1,4 +1,4 @@
/* $NetBSD: umcs.c,v 1.14 2019/09/14 12:38:40 maxv Exp $ */
/* $NetBSD: umcs.c,v 1.15 2020/01/07 06:42:26 maxv Exp $ */
/* $FreeBSD: head/sys/dev/usb/serial/umcs.c 260559 2014-01-12 11:44:28Z hselasky $ */
/*-
@ -41,7 +41,7 @@
*
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umcs.c,v 1.14 2019/09/14 12:38:40 maxv Exp $");
__KERNEL_RCSID(0, "$NetBSD: umcs.c,v 1.15 2020/01/07 06:42:26 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -125,7 +125,7 @@ static int umcs7840_param(void *, int, struct termios *);
static int umcs7840_port_open(void *, int);
static void umcs7840_port_close(void *, int);
struct ucom_methods umcs7840_methods = {
static const struct ucom_methods umcs7840_methods = {
.ucom_get_status = umcs7840_get_status,
.ucom_set = umcs7840_set,
.ucom_param = umcs7840_param,

View File

@ -1,4 +1,4 @@
/* $NetBSD: umct.c,v 1.39 2019/05/09 02:43:35 mrg Exp $ */
/* $NetBSD: umct.c,v 1.40 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
* All rights reserved.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umct.c,v 1.39 2019/05/09 02:43:35 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: umct.c,v 1.40 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -127,7 +127,7 @@ static int umct_param(void *, int, struct termios *);
static int umct_open(void *, int);
static void umct_close(void *, int);
struct ucom_methods umct_methods = {
static const struct ucom_methods umct_methods = {
.ucom_get_status = umct_get_status,
.ucom_set = umct_set,
.ucom_param = umct_param,

View File

@ -1,4 +1,4 @@
/* $NetBSD: umodem.c,v 1.72 2019/05/09 02:43:35 mrg Exp $ */
/* $NetBSD: umodem.c,v 1.73 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.72 2019/05/09 02:43:35 mrg Exp $");
__KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.73 2020/01/07 06:42:26 maxv Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -70,7 +70,7 @@ __KERNEL_RCSID(0, "$NetBSD: umodem.c,v 1.72 2019/05/09 02:43:35 mrg Exp $");
#include <dev/usb/ucomvar.h>
#include <dev/usb/umodemvar.h>
Static struct ucom_methods umodem_methods = {
Static const struct ucom_methods umodem_methods = {
.ucom_get_status = umodem_get_status,
.ucom_set = umodem_set,
.ucom_param = umodem_param,

View File

@ -1,4 +1,4 @@
/* $NetBSD: uplcom.c,v 1.85 2019/05/09 14:50:38 skrll Exp $ */
/* $NetBSD: uplcom.c,v 1.86 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.85 2019/05/09 14:50:38 skrll Exp $");
__KERNEL_RCSID(0, "$NetBSD: uplcom.c,v 1.86 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -177,7 +177,7 @@ static void uplcom_close(void *, int);
static usbd_status uplcom_vendor_control_write(struct usbd_device *, uint16_t, uint16_t);
static void uplcom_close_pipe(struct uplcom_softc *);
struct ucom_methods uplcom_methods = {
static const struct ucom_methods uplcom_methods = {
.ucom_get_status = uplcom_get_status,
.ucom_set = uplcom_set,
.ucom_param = uplcom_param,
@ -236,15 +236,15 @@ static const struct usb_devno uplcom_devs[] = {
};
#define uplcom_lookup(v, p) usb_lookup(uplcom_devs, v, p)
int uplcom_match(device_t, cfdata_t, void *);
void uplcom_attach(device_t, device_t, void *);
void uplcom_childdet(device_t, device_t);
int uplcom_detach(device_t, int);
static int uplcom_match(device_t, cfdata_t, void *);
static void uplcom_attach(device_t, device_t, void *);
static void uplcom_childdet(device_t, device_t);
static int uplcom_detach(device_t, int);
CFATTACH_DECL2_NEW(uplcom, sizeof(struct uplcom_softc), uplcom_match,
uplcom_attach, uplcom_detach, NULL, NULL, uplcom_childdet);
int
static int
uplcom_match(device_t parent, cfdata_t match, void *aux)
{
struct usb_attach_arg *uaa = aux;
@ -253,7 +253,7 @@ uplcom_match(device_t parent, cfdata_t match, void *aux)
UMATCH_VENDOR_PRODUCT : UMATCH_NONE;
}
void
static void
uplcom_attach(device_t parent, device_t self, void *aux)
{
struct uplcom_softc *sc = device_private(self);
@ -464,7 +464,7 @@ uplcom_attach(device_t parent, device_t self, void *aux)
return;
}
void
static void
uplcom_childdet(device_t self, device_t child)
{
struct uplcom_softc *sc = device_private(self);
@ -490,7 +490,7 @@ uplcom_close_pipe(struct uplcom_softc *sc)
}
}
int
static int
uplcom_detach(device_t self, int flags)
{
struct uplcom_softc *sc = device_private(self);

View File

@ -1,4 +1,4 @@
/* $NetBSD: usbnet.h,v 1.15 2019/09/09 07:20:16 mrg Exp $ */
/* $NetBSD: usbnet.h,v 1.16 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 2019 Matthew R. Green
@ -225,7 +225,7 @@ struct usbnet {
device_t un_dev;
struct usbd_interface *un_iface;
struct usbd_device *un_udev;
struct usbnet_ops *un_ops;
const struct usbnet_ops *un_ops;
struct usbnet_intr *un_intr;
/* Inputs for rx/tx chain control. */

View File

@ -1,4 +1,4 @@
/* $NetBSD: uvisor.c,v 1.53 2019/12/27 09:41:51 msaitoh Exp $ */
/* $NetBSD: uvisor.c,v 1.54 2020/01/07 06:42:26 maxv Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: uvisor.c,v 1.53 2019/12/27 09:41:51 msaitoh Exp $");
__KERNEL_RCSID(0, "$NetBSD: uvisor.c,v 1.54 2020/01/07 06:42:26 maxv Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@ -152,7 +152,7 @@ static usbd_status uvisor_init(struct uvisor_softc *,
static int uvisor_open(void *, int);
static void uvisor_close(void *, int);
struct ucom_methods uvisor_methods = {
static const struct ucom_methods uvisor_methods = {
.ucom_open = uvisor_open,
.ucom_close = uvisor_close,
};