version 1.183, 2009/09/16 16:34:50 |
version 1.184, 2009/09/16 22:45:24 |
Line 1491 config_detach_all(int how) |
|
Line 1491 config_detach_all(int how) |
|
} |
} |
|
|
int |
int |
config_activate(device_t dev) |
|
{ |
|
const struct cfattach *ca = dev->dv_cfattach; |
|
int rv = 0, oflags = dev->dv_flags; |
|
|
|
if (ca->ca_activate == NULL) |
|
return EOPNOTSUPP; |
|
|
|
if ((dev->dv_flags & DVF_ACTIVE) == 0) { |
|
dev->dv_flags |= DVF_ACTIVE; |
|
rv = (*ca->ca_activate)(dev, DVACT_ACTIVATE); |
|
if (rv) |
|
dev->dv_flags = oflags; |
|
} |
|
return rv; |
|
} |
|
|
|
int |
|
config_deactivate(device_t dev) |
config_deactivate(device_t dev) |
{ |
{ |
const struct cfattach *ca = dev->dv_cfattach; |
const struct cfattach *ca = dev->dv_cfattach; |