- make local functions/variables static

- use __arraycount()
This commit is contained in:
tsutsui 2009-09-22 13:20:36 +00:00
parent d7f21e6129
commit 2f25e6cf41
2 changed files with 13 additions and 14 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic_isapnp.c,v 1.20 2009/09/22 12:56:06 tsutsui Exp $ */
/* $NetBSD: aic_isapnp.c,v 1.21 2009/09/22 13:20:36 tsutsui Exp $ */
/*-
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aic_isapnp.c,v 1.20 2009/09/22 12:56:06 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: aic_isapnp.c,v 1.21 2009/09/22 13:20:36 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -57,8 +57,8 @@ struct aic_isapnp_softc {
void *sc_ih; /* interrupt handler */
};
int aic_isapnp_match(device_t, cfdata_t, void *);
void aic_isapnp_attach(device_t, device_t, void *);
static int aic_isapnp_match(device_t, cfdata_t, void *);
static void aic_isapnp_attach(device_t, device_t, void *);
CFATTACH_DECL_NEW(aic_isapnp, sizeof(struct aic_isapnp_softc),
aic_isapnp_match, aic_isapnp_attach, NULL, NULL);

View File

@ -1,4 +1,4 @@
/* $NetBSD: aic_pcmcia.c,v 1.41 2009/09/22 12:56:06 tsutsui Exp $ */
/* $NetBSD: aic_pcmcia.c,v 1.42 2009/09/22 13:20:36 tsutsui Exp $ */
/*
* Copyright (c) 1997 Marc Horowitz. All rights reserved.
@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: aic_pcmcia.c,v 1.41 2009/09/22 12:56:06 tsutsui Exp $");
__KERNEL_RCSID(0, "$NetBSD: aic_pcmcia.c,v 1.42 2009/09/22 13:20:36 tsutsui Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@ -62,16 +62,16 @@ struct aic_pcmcia_softc {
#define AIC_PCMCIA_ATTACHED 3
};
int aic_pcmcia_match(device_t, cfdata_t, void *);
int aic_pcmcia_validate_config(struct pcmcia_config_entry *);
void aic_pcmcia_attach(device_t, device_t, void *);
int aic_pcmcia_detach(device_t, int);
int aic_pcmcia_enable(device_t, int);
static int aic_pcmcia_match(device_t, cfdata_t, void *);
static int aic_pcmcia_validate_config(struct pcmcia_config_entry *);
static void aic_pcmcia_attach(device_t, device_t, void *);
static int aic_pcmcia_detach(device_t, int);
static int aic_pcmcia_enable(device_t, int);
CFATTACH_DECL_NEW(aic_pcmcia, sizeof(struct aic_pcmcia_softc),
aic_pcmcia_match, aic_pcmcia_attach, aic_pcmcia_detach, aic_activate);
const struct pcmcia_product aic_pcmcia_products[] = {
static const struct pcmcia_product aic_pcmcia_products[] = {
{ PCMCIA_VENDOR_ADAPTEC, PCMCIA_PRODUCT_ADAPTEC_APA1460,
PCMCIA_CIS_INVALID },
@ -81,8 +81,7 @@ const struct pcmcia_product aic_pcmcia_products[] = {
{ PCMCIA_VENDOR_NEWMEDIA, PCMCIA_PRODUCT_NEWMEDIA_BUSTOASTER,
PCMCIA_CIS_INVALID },
};
const size_t aic_pcmcia_nproducts =
sizeof(aic_pcmcia_products) / sizeof(aic_pcmcia_products[0]);
static const size_t aic_pcmcia_nproducts = __arraycount(aic_pcmcia_products);
int
aic_pcmcia_match(device_t parent, cfdata_t match, void *aux)