Tue Jul 26 22:21:03 2011 UTC ()
Don't set the iobase and iosize members of pcmciabus_attach_args because
they're not used in any meaningful way.


(dyoung)
diff -r1.113 -r1.114 src/sys/dev/ic/i82365.c
diff -r1.35 -r1.36 src/sys/dev/ic/tcic2.c

cvs diff -r1.113 -r1.114 src/sys/dev/ic/i82365.c (expand / switch to unified diff)

--- src/sys/dev/ic/i82365.c 2010/04/19 18:24:26 1.113
+++ src/sys/dev/ic/i82365.c 2011/07/26 22:21:02 1.114
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: i82365.c,v 1.113 2010/04/19 18:24:26 dyoung Exp $ */ 1/* $NetBSD: i82365.c,v 1.114 2011/07/26 22:21:02 dyoung Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2004 Charles M. Hannum. All rights reserved. 4 * Copyright (c) 2004 Charles M. Hannum. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright 11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the 12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution. 13 * documentation and/or other materials provided with the distribution.
14 * 3. All advertising materials mentioning features or use of this software 14 * 3. All advertising materials mentioning features or use of this software
@@ -39,27 +39,27 @@ @@ -39,27 +39,27 @@
39 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 39 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
40 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 40 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
41 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 41 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
42 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 42 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
43 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 43 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
44 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 44 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
45 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 45 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
46 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 46 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
47 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 47 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
48 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 48 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
49 */ 49 */
50 50
51#include <sys/cdefs.h> 51#include <sys/cdefs.h>
52__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.113 2010/04/19 18:24:26 dyoung Exp $"); 52__KERNEL_RCSID(0, "$NetBSD: i82365.c,v 1.114 2011/07/26 22:21:02 dyoung Exp $");
53 53
54#define PCICDEBUG 54#define PCICDEBUG
55 55
56#include <sys/param.h> 56#include <sys/param.h>
57#include <sys/systm.h> 57#include <sys/systm.h>
58#include <sys/device.h> 58#include <sys/device.h>
59#include <sys/extent.h> 59#include <sys/extent.h>
60#include <sys/kernel.h> 60#include <sys/kernel.h>
61#include <sys/malloc.h> 61#include <sys/malloc.h>
62#include <sys/kthread.h> 62#include <sys/kthread.h>
63 63
64#include <sys/bus.h> 64#include <sys/bus.h>
65#include <sys/intr.h> 65#include <sys/intr.h>
@@ -397,28 +397,26 @@ pcic_attach_socket(struct pcic_handle *h @@ -397,28 +397,26 @@ pcic_attach_socket(struct pcic_handle *h
397 397
398 /* initialize the rest of the handle */ 398 /* initialize the rest of the handle */
399 399
400 h->shutdown = 0; 400 h->shutdown = 0;
401 h->memalloc = 0; 401 h->memalloc = 0;
402 h->ioalloc = 0; 402 h->ioalloc = 0;
403 h->ih_irq = 0; 403 h->ih_irq = 0;
404 404
405 /* now, config one pcmcia device per socket */ 405 /* now, config one pcmcia device per socket */
406 406
407 paa.paa_busname = "pcmcia"; 407 paa.paa_busname = "pcmcia";
408 paa.pct = (pcmcia_chipset_tag_t) sc->pct; 408 paa.pct = (pcmcia_chipset_tag_t) sc->pct;
409 paa.pch = (pcmcia_chipset_handle_t) h; 409 paa.pch = (pcmcia_chipset_handle_t) h;
410 paa.iobase = sc->iobase; 
411 paa.iosize = sc->iosize; 
412 410
413 locs[PCMCIABUSCF_CONTROLLER] = h->chip; 411 locs[PCMCIABUSCF_CONTROLLER] = h->chip;
414 locs[PCMCIABUSCF_SOCKET] = h->socket; 412 locs[PCMCIABUSCF_SOCKET] = h->socket;
415 413
416 h->pcmcia = config_found_sm_loc(&sc->dev, "pcmciabus", locs, &paa, 414 h->pcmcia = config_found_sm_loc(&sc->dev, "pcmciabus", locs, &paa,
417 pcic_print, config_stdsubmatch); 415 pcic_print, config_stdsubmatch);
418 if (h->pcmcia == NULL) { 416 if (h->pcmcia == NULL) {
419 h->flags &= ~PCIC_FLAG_SOCKETP; 417 h->flags &= ~PCIC_FLAG_SOCKETP;
420 return; 418 return;
421 } 419 }
422 420
423} 421}
424 422

cvs diff -r1.35 -r1.36 src/sys/dev/ic/tcic2.c (expand / switch to unified diff)

--- src/sys/dev/ic/tcic2.c 2010/04/19 18:24:26 1.35
+++ src/sys/dev/ic/tcic2.c 2011/07/26 22:21:02 1.36
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: tcic2.c,v 1.35 2010/04/19 18:24:26 dyoung Exp $ */ 1/* $NetBSD: tcic2.c,v 1.36 2011/07/26 22:21:02 dyoung Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1998, 1999 Christoph Badura. All rights reserved. 4 * Copyright (c) 1998, 1999 Christoph Badura. All rights reserved.
5 * Copyright (c) 1997 Marc Horowitz. All rights reserved. 5 * Copyright (c) 1997 Marc Horowitz. All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -21,27 +21,27 @@ @@ -21,27 +21,27 @@
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 22 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 23 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32 32
33#include <sys/cdefs.h> 33#include <sys/cdefs.h>
34__KERNEL_RCSID(0, "$NetBSD: tcic2.c,v 1.35 2010/04/19 18:24:26 dyoung Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: tcic2.c,v 1.36 2011/07/26 22:21:02 dyoung Exp $");
35 35
36#include <sys/param.h> 36#include <sys/param.h>
37#include <sys/systm.h> 37#include <sys/systm.h>
38#include <sys/device.h> 38#include <sys/device.h>
39#include <sys/extent.h> 39#include <sys/extent.h>
40#include <sys/malloc.h> 40#include <sys/malloc.h>
41#include <sys/kthread.h> 41#include <sys/kthread.h>
42 42
43#include <sys/bus.h> 43#include <sys/bus.h>
44#include <sys/intr.h> 44#include <sys/intr.h>
45 45
46#include <dev/pcmcia/pcmciareg.h> 46#include <dev/pcmcia/pcmciareg.h>
47#include <dev/pcmcia/pcmciavar.h> 47#include <dev/pcmcia/pcmciavar.h>
@@ -402,28 +402,26 @@ tcic_attach_socket(struct tcic_handle *h @@ -402,28 +402,26 @@ tcic_attach_socket(struct tcic_handle *h
402 402
403 /* initialize the rest of the handle */ 403 /* initialize the rest of the handle */
404 404
405 h->shutdown = 0; 405 h->shutdown = 0;
406 h->memalloc = 0; 406 h->memalloc = 0;
407 h->ioalloc = 0; 407 h->ioalloc = 0;
408 h->ih_irq = 0; 408 h->ih_irq = 0;
409 409
410 /* now, config one pcmcia device per socket */ 410 /* now, config one pcmcia device per socket */
411 411
412 paa.paa_busname = "pcmcia"; 412 paa.paa_busname = "pcmcia";
413 paa.pct = (pcmcia_chipset_tag_t) h->sc->pct; 413 paa.pct = (pcmcia_chipset_tag_t) h->sc->pct;
414 paa.pch = (pcmcia_chipset_handle_t) h; 414 paa.pch = (pcmcia_chipset_handle_t) h;
415 paa.iobase = h->sc->iobase; 
416 paa.iosize = h->sc->iosize; 
417 415
418 locs[PCMCIABUSCF_CONTROLLER] = 0; 416 locs[PCMCIABUSCF_CONTROLLER] = 0;
419 locs[PCMCIABUSCF_SOCKET] = h->sock; 417 locs[PCMCIABUSCF_SOCKET] = h->sock;
420 418
421 h->pcmcia = config_found_sm_loc(&h->sc->dev, "pcmciabus", locs, &paa, 419 h->pcmcia = config_found_sm_loc(&h->sc->dev, "pcmciabus", locs, &paa,
422 tcic_print, config_stdsubmatch); 420 tcic_print, config_stdsubmatch);
423 421
424 /* if there's actually a pcmcia device attached, initialize the slot */ 422 /* if there's actually a pcmcia device attached, initialize the slot */
425 423
426 if (h->pcmcia) 424 if (h->pcmcia)
427 tcic_init_socket(h); 425 tcic_init_socket(h);
428} 426}
429 427