9
0
Fork 0

ehci: add remove function

and stop the ehci controller before the kernel is trying to restart it.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
This commit is contained in:
Michael Grzeschik 2010-08-04 11:59:13 +02:00 committed by Sascha Hauer
parent ac8066ae5e
commit b0e989f618
1 changed files with 8 additions and 0 deletions

View File

@ -898,6 +898,7 @@ static int ehci_probe(struct device_d *dev)
ehci = xmalloc(sizeof(struct ehci_priv));
host = &ehci->host;
dev->priv = ehci;
if (pdata) {
ehci->flags = pdata->flags;
@ -926,9 +927,16 @@ static int ehci_probe(struct device_d *dev)
return 0;
}
static void ehci_remove(struct device_d *dev)
{
struct ehci_priv *ehci = dev->priv;
ehci_halt(ehci);
}
static struct driver_d ehci_driver = {
.name = "ehci",
.probe = ehci_probe,
.remove = ehci_remove,
};
static int ehcil_init(void)