Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/i386 kill the "busname" attach arg for acpi, apm, p...



details:   https://anonhg.NetBSD.org/src/rev/2dbcac498b84
branches:  trunk
changeset: 581440:2dbcac498b84
user:      drochner <drochner%NetBSD.org@localhost>
date:      Wed Jun 01 16:49:14 2005 +0000

description:
kill the "busname" attach arg for acpi, apm, pnpbios and vesabios,
and pass NULL "print" function pointers to their config_found functions
because they shouldn't be called anyway

diffstat:

 sys/arch/i386/bios/vesabios.h      |   8 ++------
 sys/arch/i386/i386/apm.c           |  13 ++-----------
 sys/arch/i386/i386/mainbus.c       |  20 +++++++-------------
 sys/arch/i386/include/apmvar.h     |   3 +--
 sys/arch/i386/pnpbios/pnpbios.c    |  14 ++------------
 sys/arch/i386/pnpbios/pnpbiosvar.h |   3 +--
 6 files changed, 15 insertions(+), 46 deletions(-)

diffs (205 lines):

diff -r bfea9cadb032 -r 2dbcac498b84 sys/arch/i386/bios/vesabios.h
--- a/sys/arch/i386/bios/vesabios.h     Wed Jun 01 16:44:38 2005 +0000
+++ b/sys/arch/i386/bios/vesabios.h     Wed Jun 01 16:49:14 2005 +0000
@@ -1,13 +1,9 @@
-/* $NetBSD: vesabios.h,v 1.3 2005/02/03 20:24:25 perry Exp $ */
+/* $NetBSD: vesabios.h,v 1.4 2005/06/01 16:49:14 drochner Exp $ */
 
 int vbeprobe(void);
 
-struct vesabios_attach_args {
-       char *vaa_busname;
-};
-
 struct vesabiosdev_attach_args {
-       char *vbaa_type;
+       const char *vbaa_type;
        int *vbaa_modes;
        int vbaa_nmodes;
 };
diff -r bfea9cadb032 -r 2dbcac498b84 sys/arch/i386/i386/apm.c
--- a/sys/arch/i386/i386/apm.c  Wed Jun 01 16:44:38 2005 +0000
+++ b/sys/arch/i386/i386/apm.c  Wed Jun 01 16:49:14 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apm.c,v 1.86 2005/05/31 21:47:22 drochner Exp $ */
+/*     $NetBSD: apm.c,v 1.87 2005/06/01 16:49:14 drochner Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.86 2005/05/31 21:47:22 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: apm.c,v 1.87 2005/06/01 16:49:14 drochner Exp $");
 
 #include "apm.h"
 #if NAPM > 1
@@ -1105,15 +1105,6 @@
        return (apm_enabled);
 }
 
-int
-apmbus_print(void *aux, const char *pnp)
-{
-
-       if (pnp)
-               aprint_normal("apm at %s", pnp);
-       return (UNCONF);
-}
-
 #define        DPRINTF_BIOSRETURN(regs, bits)                                  \
        DPRINTF(APMDEBUG_ATTACH,                                        \
            ("bioscall return: %x %x %x %x %s %x %x",                   \
diff -r bfea9cadb032 -r 2dbcac498b84 sys/arch/i386/i386/mainbus.c
--- a/sys/arch/i386/i386/mainbus.c      Wed Jun 01 16:44:38 2005 +0000
+++ b/sys/arch/i386/i386/mainbus.c      Wed Jun 01 16:49:14 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mainbus.c,v 1.56 2005/05/31 22:39:08 drochner Exp $    */
+/*     $NetBSD: mainbus.c,v 1.57 2005/06/01 16:49:14 drochner Exp $    */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.56 2005/05/31 22:39:08 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.57 2005/06/01 16:49:14 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -109,9 +109,6 @@
 #if NACPI > 0
        struct acpibus_attach_args mba_acpi;
 #endif
-#if NVESABIOS > 0
-       struct vesabios_attach_args mba_vba;
-#endif
 };
 
 /*
@@ -227,10 +224,8 @@
        }
 
 #if NVESABIOS > 0
-       if (vbeprobe()) {
-               mba.mba_vba.vaa_busname = "vesabios";
-               config_found_ia(self, "vesabiosbus", &mba.mba_vba, mainbus_print);
-       }
+       if (vbeprobe())
+               config_found_ia(self, "vesabiosbus", 0, 0);
 #endif
 
 #if NISADMA > 0 && (NACPI > 0 || NPNPBIOS > 0)
@@ -243,7 +238,6 @@
 
 #if NACPI > 0
        if (acpi_present) {
-               mba.mba_acpi.aa_busname = "acpi";
                mba.mba_acpi.aa_iot = X86_BUS_SPACE_IO;
                mba.mba_acpi.aa_memt = X86_BUS_SPACE_MEM;
                mba.mba_acpi.aa_pc = NULL;
@@ -252,7 +246,7 @@
                    PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY |
                    PCI_FLAGS_MWI_OKAY;
                mba.mba_acpi.aa_ic = &x86_isa_chipset;
-               config_found_ia(self, "acpibus", &mba.mba_acpi, mainbus_print);
+               config_found_ia(self, "acpibus", &mba.mba_acpi, 0);
 #if 0 /* XXXJRT not yet */
                if (acpi_active) {
                        /*
@@ -271,7 +265,7 @@
 #endif
        if (pnpbios_probe()) {
                mba.mba_paa.paa_ic = &x86_isa_chipset;
-               config_found_ia(self, "pnpbiosbus", &mba.mba_paa, pnpbiosbusprint);
+               config_found_ia(self, "pnpbiosbus", &mba.mba_paa, 0);
        }
 #endif
 
@@ -337,7 +331,7 @@
        if (acpi_active == 0)
 #endif
        if (apm_busprobe())
-               config_found_ia(self, "apmbus", 0, apmbus_print);
+               config_found_ia(self, "apmbus", 0, 0);
 #endif
 }
 
diff -r bfea9cadb032 -r 2dbcac498b84 sys/arch/i386/include/apmvar.h
--- a/sys/arch/i386/include/apmvar.h    Wed Jun 01 16:44:38 2005 +0000
+++ b/sys/arch/i386/include/apmvar.h    Wed Jun 01 16:49:14 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: apmvar.h,v 1.21 2005/05/31 21:47:22 drochner Exp $     */
+/*     $NetBSD: apmvar.h,v 1.22 2005/06/01 16:49:14 drochner Exp $     */
 /*-
  * Copyright (c) 1995 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -75,7 +75,6 @@
 void apminit(void);
 int apm_set_powstate(u_int devid, u_int powstate);
 int apm_busprobe(void);
-int apmbus_print(void *, const char *);
 #endif /* _KERNEL */
 #endif /* _LOCORE */
 #endif /* __i386_apm_h__ */
diff -r bfea9cadb032 -r 2dbcac498b84 sys/arch/i386/pnpbios/pnpbios.c
--- a/sys/arch/i386/pnpbios/pnpbios.c   Wed Jun 01 16:44:38 2005 +0000
+++ b/sys/arch/i386/pnpbios/pnpbios.c   Wed Jun 01 16:49:14 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pnpbios.c,v 1.48 2005/05/31 22:39:08 drochner Exp $ */
+/* $NetBSD: pnpbios.c,v 1.49 2005/06/01 16:49:14 drochner Exp $ */
 
 /*
  * Copyright (c) 2000 Jason R. Thorpe.  All rights reserved.
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.48 2005/05/31 22:39:08 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pnpbios.c,v 1.49 2005/06/01 16:49:14 drochner Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -131,7 +131,6 @@
                            struct cfdata *, void *);
 static void    pnpbios_attach(struct device *,
                            struct device *, void *);
-int            pnpbiosbusprint(void *, const char *);
 static void    pnpbios_printres(struct pnpresources *);
 static int     pnpbios_print(void *aux, const char *);
 static void    pnpbios_id_to_string(u_int32_t, char *);
@@ -258,15 +257,6 @@
        return (pnpbios_enabled);
 }
 
-int
-pnpbiosbusprint(void *aux, const char *pnp)
-{
-
-       if (pnp)
-               aprint_normal("pnpbios at %s",pnp);
-       return (UNCONF);
-}
-
 static caddr_t
 pnpbios_mapit(u_long addr, u_long len, int prot)
 {
diff -r bfea9cadb032 -r 2dbcac498b84 sys/arch/i386/pnpbios/pnpbiosvar.h
--- a/sys/arch/i386/pnpbios/pnpbiosvar.h        Wed Jun 01 16:44:38 2005 +0000
+++ b/sys/arch/i386/pnpbios/pnpbiosvar.h        Wed Jun 01 16:49:14 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pnpbiosvar.h,v 1.7 2005/05/31 22:39:08 drochner Exp $ */
+/* $NetBSD: pnpbiosvar.h,v 1.8 2005/06/01 16:49:14 drochner Exp $ */
 /*
  * Copyright (c) 1999
  *     Matthias Drochner.  All rights reserved.
@@ -84,7 +84,6 @@
        char *primid;
 };
 
-int pnpbiosbusprint(void *aux, const char *pnp);
 int pnpbios_io_map(pnpbios_tag_t, struct pnpresources *, int,
                        bus_space_tag_t *, bus_space_handle_t *);
 void pnpbios_io_unmap(pnpbios_tag_t, struct pnpresources *, int,



Home | Main Index | Thread Index | Old Index