owc_gpiobus.c (f24f20f4357df32f2fada6b680751d5fff6d776b) owc_gpiobus.c (b832a7e5053cd29ec8d5421482ffd3b311e27092)
1/*-
2 * Copyright (c) 2015 M. Warner Losh <imp@FreeBSD.org>
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

126 sc->sc_dev = dev;
127 sc->sc_busdev = device_get_parent(dev);
128 OWC_GPIOBUS_LOCK_INIT(sc);
129 nkid = 0;
130 if (device_get_children(dev, &kids, &nkid) == 0)
131 free(kids, M_TEMP);
132 if (nkid == 0)
133 device_add_child(dev, "ow", -1);
1/*-
2 * Copyright (c) 2015 M. Warner Losh <imp@FreeBSD.org>
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.

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

126 sc->sc_dev = dev;
127 sc->sc_busdev = device_get_parent(dev);
128 OWC_GPIOBUS_LOCK_INIT(sc);
129 nkid = 0;
130 if (device_get_children(dev, &kids, &nkid) == 0)
131 free(kids, M_TEMP);
132 if (nkid == 0)
133 device_add_child(dev, "ow", -1);
134 config_intrhook_oneshot((ich_func_t)bus_generic_attach, dev);
134 bus_delayed_attach_children(dev);
135
136 return (0);
137}
138
139static int
140owc_gpiobus_detach(device_t dev)
141{
142 struct owc_gpiobus_softc *sc;

--- 279 unchanged lines hidden ---
135
136 return (0);
137}
138
139static int
140owc_gpiobus_detach(device_t dev)
141{
142 struct owc_gpiobus_softc *sc;

--- 279 unchanged lines hidden ---