> -----Original Message----- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Wednesday, June 04, 2014 2:10 PM > To: Gonglei (Arei) > Cc: qemu-devel@nongnu.org; Luonengjun; Huangweidong (C); Huangpeng > (Peter) > Subject: Re: [PATCH v2 7/9] usb-ehci: add ehci-pci device exit function > > On Di, 2014-06-03 at 18:54 +0800, arei.gong...@huawei.com wrote: > > From: Gonglei <arei.gong...@huawei.com> > > > > clean up ehci resource when ehci pci device exit. > > > > Signed-off-by: Gonglei <arei.gong...@huawei.com> > > --- > > hw/usb/hcd-ehci-pci.c | 33 +++++++++++++++++++++++++++++++++ > > 1 file changed, 33 insertions(+) > > > > diff --git a/hw/usb/hcd-ehci-pci.c b/hw/usb/hcd-ehci-pci.c > > index 505741a..115d9b5 100644 > > --- a/hw/usb/hcd-ehci-pci.c > > +++ b/hw/usb/hcd-ehci-pci.c > > @@ -84,6 +84,38 @@ static void usb_ehci_pci_init(Object *obj) > > usb_ehci_init(s, DEVICE(obj)); > > } > > > > +static void usb_ehci_pci_exit(PCIDevice *dev) > > +{ > > Too much non-pci stuff in here. I think we should create a > usb_ehci_unrealize function and do the cleanup there, then just call > this from usb_ehci_pci_exit. You also don't need patch #6 then. > Good idea! I will do it in v3, Thanks!
Best regards, -Gonglei