Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src-draft/trunk]: src/sys/dev/pci Set up device config properly.
details: https://anonhg.NetBSD.org/src-all/rev/0bbb10e5fcce
branches: trunk
changeset: 990887:0bbb10e5fcce
user: Nathanial Sloss <nat%netbsd.org@localhost>
date: Thu Sep 24 12:35:38 2020 +1000
description:
Set up device config properly.
diffstat:
sys/dev/pci/if_iwm.c | 19 +++++++++----------
1 files changed, 9 insertions(+), 10 deletions(-)
diffs (68 lines):
diff -r 21f543a43c6e -r 0bbb10e5fcce sys/dev/pci/if_iwm.c
--- a/sys/dev/pci/if_iwm.c Thu Sep 24 12:29:49 2020 +1000
+++ b/sys/dev/pci/if_iwm.c Thu Sep 24 12:35:38 2020 +1000
@@ -502,7 +502,7 @@
//static int iwm_preinit(struct iwm_softc *);
static void iwm_attach_hook(device_t);
static void iwm_attach(device_t, device_t, void *);
-static int iwm_config_complete(device_t);
+static int iwm_config_complete(struct iwm_softc *);
#if 0
static void iwm_init_task(void *);
static int iwm_activate(device_t, enum devact);
@@ -7936,15 +7936,15 @@
return 0;
}
+#endif
static void
iwm_attach_hook(device_t dev)
{
struct iwm_softc *sc = device_private(dev);
- iwm_preinit(sc);
-}
-#endif
+ iwm_config_complete(sc);
+}
static void
iwm_attach(device_t parent, device_t self, void *aux)
@@ -8248,13 +8248,14 @@
else
aprint_error_dev(self, "couldn't establish power handler\n");
+#if 0
if (config_finalize_register(self, iwm_config_complete)) {
aprint_error_dev(self,
"Falied to register config finalize");
goto fail6;
}
-
-#if 0
+#endif
+
/*
* We can't do normal attach before the file system is mounted
* because we cannot read the MAC address without loading the
@@ -8264,7 +8265,6 @@
* hook runs.
*/
config_mountroot(self, iwm_attach_hook);
-#endif
return;
@@ -8279,9 +8279,8 @@
}
static int
-iwm_config_complete(device_t self)
-{
- struct iwm_softc *sc = device_private(self);
+iwm_config_complete(struct iwm_softc *sc)
+{
struct ieee80211com *ic = &sc->sc_ic;
if (ic->ic_name != NULL && strcmp("iwm", ic->ic_name) == 0)
Home |
Main Index |
Thread Index |
Old Index