Release i2c bus on detach.

This commit is contained in:
Ruslan Bukin 2014-04-01 04:40:08 +00:00
parent ac030c53c0
commit 2638cebe23

View File

@ -234,9 +234,22 @@ ec_attach(device_t dev)
return (0);
}
static int
ec_detach(device_t dev)
{
struct ec_softc *sc;
sc = device_get_softc(dev);
bus_release(sc);
return (0);
}
static device_method_t ec_methods[] = {
DEVMETHOD(device_probe, ec_probe),
DEVMETHOD(device_attach, ec_attach),
DEVMETHOD(device_detach, ec_detach),
{ 0, 0 }
};