Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/thorpej-cfargs]: src/sys/arch/hpcmips/dev plumpcmcia has only a single i...



details:   https://anonhg.NetBSD.org/src/rev/1bb52f15a90c
branches:  thorpej-cfargs
changeset: 953882:1bb52f15a90c
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Tue Mar 23 06:18:23 2021 +0000

description:
plumpcmcia has only a single interface attribute, so no need to
use config_found_ia().

While here, also fix an apparent bug left over from when device_t and
driver softcs were fully split ... config_found() takes a device_t, not
the associated softc.  (Issue was masked by a case to "void *".)

diffstat:

 sys/arch/hpcmips/dev/plumpcmcia.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (35 lines):

diff -r 4457e1af62d7 -r 1bb52f15a90c sys/arch/hpcmips/dev/plumpcmcia.c
--- a/sys/arch/hpcmips/dev/plumpcmcia.c Tue Mar 23 01:29:32 2021 +0000
+++ b/sys/arch/hpcmips/dev/plumpcmcia.c Tue Mar 23 06:18:23 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: plumpcmcia.c,v 1.28 2016/06/30 08:51:06 skrll Exp $ */
+/*     $NetBSD: plumpcmcia.c,v 1.28.32.1 2021/03/23 06:18:23 thorpej Exp $ */
 
 /*
  * Copyright (c) 1999, 2000 UCHIYAMA Yasushi. All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.28 2016/06/30 08:51:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.28.32.1 2021/03/23 06:18:23 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -303,14 +303,13 @@
 plumpcmcia_attach_socket(struct plumpcmcia_handle *ph)
 {
        struct pcmciabus_attach_args paa;
-       struct plumpcmcia_softc *sc = device_private(ph->ph_parent);
 
        paa.paa_busname = "pcmcia";
        paa.pct = (pcmcia_chipset_tag_t)&plumpcmcia_functions;
        paa.pch = (pcmcia_chipset_handle_t)ph;
 
-       if ((ph->ph_pcmcia = config_found_ia((void*)sc, "pcmciabus", &paa,
-           plumpcmcia_print))) {
+       if ((ph->ph_pcmcia = config_found(ph->ph_parent, &paa, plumpcmcia_print,
+                                         CFARG_EOL))) {
                /* Enable slot */
                plum_conf_write(ph->ph_regt, ph->ph_regh,
                    PLUM_PCMCIA_SLOTCTRL,



Home | Main Index | Thread Index | Old Index