Deleted Added
full compact
pccard.c (120868) pccard.c (121521)
1/* $NetBSD: pcmcia.c,v 1.23 2000/07/28 19:17:02 drochner Exp $ */
2
3/*
4 * Copyright (c) 1997 Marc Horowitz. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 16 unchanged lines hidden (view full) ---

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
1/* $NetBSD: pcmcia.c,v 1.23 2000/07/28 19:17:02 drochner Exp $ */
2
3/*
4 * Copyright (c) 1997 Marc Horowitz. All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 16 unchanged lines hidden (view full) ---

25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 */
31
32#include <sys/cdefs.h>
33__FBSDID("$FreeBSD: head/sys/dev/pccard/pccard.c 120868 2003-10-07 03:33:54Z imp $");
33__FBSDID("$FreeBSD: head/sys/dev/pccard/pccard.c 121521 2003-10-26 00:51:40Z imp $");
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/malloc.h>
38#include <sys/module.h>
39#include <sys/kernel.h>
40#include <sys/queue.h>
41#include <sys/sysctl.h>

--- 104 unchanged lines hidden (view full) ---

146 bus_space_write_1(pf->pf_ccrt, pf->pf_ccrh,
147 pf->pf_ccr_offset + ccr, val);
148 }
149}
150
151static int
152pccard_set_default_descr(device_t dev)
153{
34
35#include <sys/param.h>
36#include <sys/systm.h>
37#include <sys/malloc.h>
38#include <sys/module.h>
39#include <sys/kernel.h>
40#include <sys/queue.h>
41#include <sys/sysctl.h>

--- 104 unchanged lines hidden (view full) ---

146 bus_space_write_1(pf->pf_ccrt, pf->pf_ccrh,
147 pf->pf_ccr_offset + ccr, val);
148 }
149}
150
151static int
152pccard_set_default_descr(device_t dev)
153{
154 char *vendorstr, *prodstr, *str;
154 const char *vendorstr, *prodstr;
155 char *str;
155
156 if (pccard_get_vendor_str(dev, &vendorstr))
157 return (0);
158 if (pccard_get_product_str(dev, &prodstr))
159 return (0);
160 str = malloc(strlen(vendorstr) + strlen(prodstr) + 2, M_DEVBUF,
161 M_WAITOK);
162 sprintf(str, "%s %s", vendorstr, prodstr);

--- 156 unchanged lines hidden (view full) ---

319 const struct pccard_product *tab, size_t ent_size,
320 pccard_product_match_fn matchfn)
321{
322 const struct pccard_product *ent;
323 int matches;
324 u_int32_t fcn;
325 u_int32_t vendor;
326 u_int32_t prod;
156
157 if (pccard_get_vendor_str(dev, &vendorstr))
158 return (0);
159 if (pccard_get_product_str(dev, &prodstr))
160 return (0);
161 str = malloc(strlen(vendorstr) + strlen(prodstr) + 2, M_DEVBUF,
162 M_WAITOK);
163 sprintf(str, "%s %s", vendorstr, prodstr);

--- 156 unchanged lines hidden (view full) ---

320 const struct pccard_product *tab, size_t ent_size,
321 pccard_product_match_fn matchfn)
322{
323 const struct pccard_product *ent;
324 int matches;
325 u_int32_t fcn;
326 u_int32_t vendor;
327 u_int32_t prod;
327 char *vendorstr;
328 char *prodstr;
328 const char *vendorstr;
329 const char *prodstr;
329
330#ifdef DIAGNOSTIC
331 if (sizeof *ent > ent_size)
332 panic("pccard_product_lookup: bogus ent_size %jd",
333 (intmax_t) ent_size);
334#endif
335 if (pccard_get_vendor(dev, &vendor))
336 return (NULL);

--- 968 unchanged lines hidden ---
330
331#ifdef DIAGNOSTIC
332 if (sizeof *ent > ent_size)
333 panic("pccard_product_lookup: bogus ent_size %jd",
334 (intmax_t) ent_size);
335#endif
336 if (pccard_get_vendor(dev, &vendor))
337 return (NULL);

--- 968 unchanged lines hidden ---