diff options
| author | Warner Losh <imp@FreeBSD.org> | 2005-07-01 15:52:50 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2005-07-01 15:52:50 +0000 |
| commit | 5af5f40c7555dcdf008903bfabcb8b5783de6512 (patch) | |
| tree | 0b8759593b5d40ca2489dd80607e5accc80abdda /sys/dev/pccard | |
| parent | 655a4d037d1053c96235eac09e641f5459071fc3 (diff) | |
Notes
Diffstat (limited to 'sys/dev/pccard')
| -rw-r--r-- | sys/dev/pccard/pccard_cis.c | 14 | ||||
| -rw-r--r-- | sys/dev/pccard/pccardvar.h | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/sys/dev/pccard/pccard_cis.c b/sys/dev/pccard/pccard_cis.c index 7c7898e151fa..6a965e742818 100644 --- a/sys/dev/pccard/pccard_cis.c +++ b/sys/dev/pccard/pccard_cis.c @@ -71,8 +71,8 @@ struct cis_state { struct pccard_function *pf; }; -static int pccard_parse_cis_tuple(struct pccard_tuple *, void *); -static int decode_funce(struct pccard_tuple *, struct pccard_function *); +static int pccard_parse_cis_tuple(const struct pccard_tuple *, void *); +static int decode_funce(const struct pccard_tuple *, struct pccard_function *); void pccard_read_cis(struct pccard_softc *sc) @@ -80,9 +80,7 @@ pccard_read_cis(struct pccard_softc *sc) struct cis_state state; bzero(&state, sizeof state); - state.card = &sc->card; - state.card->error = 0; state.card->cis1_major = -1; state.card->cis1_minor = -1; @@ -93,7 +91,6 @@ pccard_read_cis(struct pccard_softc *sc) state.card->manufacturer = PCMCIA_VENDOR_INVALID; state.card->product = PCMCIA_PRODUCT_INVALID; STAILQ_INIT(&state.card->pf_head); - state.pf = NULL; tsleep(&state, 0, "pccard", hz); @@ -616,7 +613,7 @@ pccard_print_cis(device_t dev) } static int -pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) +pccard_parse_cis_tuple(const struct pccard_tuple *tuple, void *arg) { /* most of these are educated guesses */ static struct pccard_config_entry init_cfe = { @@ -813,9 +810,8 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) "valid CISTPL_FUNCID\n")); break; } - if (tuple->length >= 2) { + if (tuple->length >= 2) decode_funce(tuple, state->pf); - } DPRINTF(("CISTPL_FUNCE\n")); break; case CISTPL_CONFIG: @@ -1268,7 +1264,7 @@ pccard_parse_cis_tuple(struct pccard_tuple *tuple, void *arg) } static int -decode_funce(struct pccard_tuple *tuple, struct pccard_function *pf) +decode_funce(const struct pccard_tuple *tuple, struct pccard_function *pf) { int i; int len; diff --git a/sys/dev/pccard/pccardvar.h b/sys/dev/pccard/pccardvar.h index 3df9fcc66540..20ef3026d8b4 100644 --- a/sys/dev/pccard/pccardvar.h +++ b/sys/dev/pccard/pccardvar.h @@ -221,7 +221,7 @@ struct pccard_tuple { bus_space_handle_t memh; }; -typedef int (*pccard_scan_t)(struct pccard_tuple *, void *); +typedef int (*pccard_scan_t)(const struct pccard_tuple *, void *); struct pccard_product { const char *pp_name; /* NULL if end of table */ |
