Page MenuHomeFreeBSD

D47677.diff
No OneTemporary

D47677.diff

diff --git a/sys/arm/broadcom/bcm2835/bcm2835_bsc.c b/sys/arm/broadcom/bcm2835/bcm2835_bsc.c
--- a/sys/arm/broadcom/bcm2835/bcm2835_bsc.c
+++ b/sys/arm/broadcom/bcm2835/bcm2835_bsc.c
@@ -349,7 +349,8 @@
}
/* Probe and attach the iicbus when interrupts are available. */
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
}
static int
diff --git a/sys/arm/freescale/imx/imx_i2c.c b/sys/arm/freescale/imx/imx_i2c.c
--- a/sys/arm/freescale/imx/imx_i2c.c
+++ b/sys/arm/freescale/imx/imx_i2c.c
@@ -469,7 +469,8 @@
/* We don't do a hardware reset here because iicbus_attach() does it. */
/* Probe and attach the iicbus when interrupts are available. */
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
}
static int
diff --git a/sys/arm/freescale/imx/imx_spi.c b/sys/arm/freescale/imx/imx_spi.c
--- a/sys/arm/freescale/imx/imx_spi.c
+++ b/sys/arm/freescale/imx/imx_spi.c
@@ -564,7 +564,8 @@
* their attach. We can't do IO until timers and interrupts are working.
*/
sc->spibus = device_add_child(dev, "spibus", DEVICE_UNIT_ANY);
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
}
static int
diff --git a/sys/arm/mv/a37x0_spi.c b/sys/arm/mv/a37x0_spi.c
--- a/sys/arm/mv/a37x0_spi.c
+++ b/sys/arm/mv/a37x0_spi.c
@@ -217,7 +217,8 @@
device_add_child(dev, "spibus", DEVICE_UNIT_ANY);
/* Probe and attach the spibus when interrupts are available. */
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
}
static int
diff --git a/sys/arm/mv/mv_spi.c b/sys/arm/mv/mv_spi.c
--- a/sys/arm/mv/mv_spi.c
+++ b/sys/arm/mv/mv_spi.c
@@ -171,7 +171,8 @@
device_add_child(dev, "spibus", DEVICE_UNIT_ANY);
/* Probe and attach the spibus when interrupts are available. */
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
}
static int
diff --git a/sys/arm/ti/ti_i2c.c b/sys/arm/ti/ti_i2c.c
--- a/sys/arm/ti/ti_i2c.c
+++ b/sys/arm/ti/ti_i2c.c
@@ -889,7 +889,7 @@
}
/* Probe and attach the iicbus when interrupts are available. */
- err = bus_delayed_attach_children(dev);
+ bus_delayed_attach_children(dev);
out:
if (err) {
diff --git a/sys/dev/glxiic/glxiic.c b/sys/dev/glxiic/glxiic.c
--- a/sys/dev/glxiic/glxiic.c
+++ b/sys/dev/glxiic/glxiic.c
@@ -408,7 +408,7 @@
glxiic_smb_enable(sc, IIC_FASTEST, 0);
/* Probe and attach the iicbus when interrupts are available. */
- error = bus_delayed_attach_children(dev);
+ bus_delayed_attach_children(dev);
out:
if (error != 0) {
diff --git a/sys/dev/hid/hidbus.c b/sys/dev/hid/hidbus.c
--- a/sys/dev/hid/hidbus.c
+++ b/sys/dev/hid/hidbus.c
@@ -272,15 +272,12 @@
if (sc->nest != 0)
return (0);
- if (hid_is_keyboard(sc->rdesc.data, sc->rdesc.len) != 0) {
+ if (hid_is_keyboard(sc->rdesc.data, sc->rdesc.len) != 0)
bus_attach_children(dev);
- error = 0;
- } else
- error = bus_delayed_attach_children(dev);
- if (error != 0)
- device_printf(dev, "failed to attach child: error %d\n", error);
+ else
+ bus_delayed_attach_children(dev);
- return (error);
+ return (0);
}
static int
diff --git a/sys/dev/ichsmb/ichsmb.c b/sys/dev/ichsmb/ichsmb.c
--- a/sys/dev/ichsmb/ichsmb.c
+++ b/sys/dev/ichsmb/ichsmb.c
@@ -130,7 +130,8 @@
}
/* Attach children when interrupts are available */
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
fail:
mtx_destroy(&sc->mutex);
return (error);
diff --git a/sys/dev/iicbus/controller/cadence/cdnc_i2c.c b/sys/dev/iicbus/controller/cadence/cdnc_i2c.c
--- a/sys/dev/iicbus/controller/cadence/cdnc_i2c.c
+++ b/sys/dev/iicbus/controller/cadence/cdnc_i2c.c
@@ -617,7 +617,8 @@
cdnc_i2c_add_sysctls(dev);
/* Probe and attach iicbus when interrupts work. */
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
}
static int
diff --git a/sys/dev/intel/spi.c b/sys/dev/intel/spi.c
--- a/sys/dev/intel/spi.c
+++ b/sys/dev/intel/spi.c
@@ -529,7 +529,8 @@
device_add_child(dev, "spibus", DEVICE_UNIT_ANY);
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
error:
INTELSPI_LOCK_DESTROY(sc);
diff --git a/sys/dev/ow/owc_gpiobus.c b/sys/dev/ow/owc_gpiobus.c
--- a/sys/dev/ow/owc_gpiobus.c
+++ b/sys/dev/ow/owc_gpiobus.c
@@ -134,7 +134,8 @@
* the system timecounter (which initializes after device attachments).
*/
device_add_child(sc->sc_dev, "ow", DEVICE_UNIT_ANY);
- return (bus_delayed_attach_children(dev));
+ bus_delayed_attach_children(dev);
+ return (0);
}
static int
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -3479,13 +3479,11 @@
* attach until after interrupts and/or timers are running. This function
* delays their attach until interrupts and timers are enabled.
*/
-int
+void
bus_delayed_attach_children(device_t dev)
{
/* Probe and attach the bus children when interrupts are available */
config_intrhook_oneshot((ich_func_t)bus_attach_children, dev);
-
- return (0);
}
/**
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -595,9 +595,9 @@
int bus_child_location(device_t child, struct sbuf *sb);
void bus_attach_children(device_t dev);
+void bus_delayed_attach_children(device_t bus);
int bus_detach_children(device_t dev);
void bus_enumerate_hinted_children(device_t bus);
-int bus_delayed_attach_children(device_t bus);
void bus_identify_children(device_t dev);
static __inline struct resource *

File Metadata

Mime Type
text/plain
Expires
Thu, Nov 21, 11:39 AM (20 h, 43 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14750160
Default Alt Text
D47677.diff (5 KB)

Event Timeline