- Provide and consume module dependency information.
- Fix whitespace bugs. MFC after: 3 days
This commit is contained in:
parent
1a643b0f02
commit
47c657e929
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=182070
@ -105,6 +105,7 @@ static driver_t central_driver = {
|
||||
static devclass_t central_devclass;
|
||||
|
||||
DRIVER_MODULE(central, nexus, central_driver, central_devclass, 0, 0);
|
||||
MODULE_VERSION(central, 1);
|
||||
|
||||
static int
|
||||
central_probe(device_t dev)
|
||||
@ -159,7 +160,7 @@ central_attach(device_t dev)
|
||||
resource_list_add(&cdi->cdi_rl, SYS_RES_MEMORY, i,
|
||||
reg[i].sbr_offset, reg[i].sbr_offset +
|
||||
reg[i].sbr_size, reg[i].sbr_size);
|
||||
free(reg, M_OFWPROP);
|
||||
free(reg, M_OFWPROP);
|
||||
cdev = device_add_child(dev, NULL, -1);
|
||||
if (cdev == NULL) {
|
||||
device_printf(dev, "<%s>: device_add_child failed\n",
|
||||
|
@ -120,6 +120,8 @@ static devclass_t fhc_devclass;
|
||||
|
||||
DRIVER_MODULE(fhc, central, fhc_driver, fhc_devclass, 0, 0);
|
||||
DRIVER_MODULE(fhc, nexus, fhc_driver, fhc_devclass, 0, 0);
|
||||
MODULE_DEPEND(fhc, central, 1, 1, 1);
|
||||
MODULE_VERSION(fhc, 1);
|
||||
|
||||
static const struct intr_controller fhc_ic = {
|
||||
fhc_intr_enable,
|
||||
@ -320,7 +322,7 @@ fhc_attach(device_t dev)
|
||||
if (sc->sc_memres[i] != NULL)
|
||||
bus_release_resource(dev, SYS_RES_MEMORY,
|
||||
rman_get_rid(sc->sc_memres[i]), sc->sc_memres[i]);
|
||||
return (error);
|
||||
return (error);
|
||||
}
|
||||
|
||||
static int
|
||||
@ -399,12 +401,12 @@ fhc_setup_intr(device_t bus, device_t child, struct resource *r, int flags,
|
||||
/*
|
||||
* Make sure the vector is fully specified and we registered
|
||||
* our interrupt controller for it.
|
||||
*/
|
||||
*/
|
||||
vec = rman_get_start(r);
|
||||
if (INTIGN(vec) != sc->sc_ign || intr_vectors[vec].iv_ic != &fhc_ic) {
|
||||
device_printf(bus, "invalid interrupt vector 0x%lx\n", vec);
|
||||
return (EINVAL);
|
||||
}
|
||||
return (EINVAL);
|
||||
}
|
||||
return (bus_generic_setup_intr(bus, child, r, flags, filt, func,
|
||||
arg, cookiep));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user