Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1539571
| From | Stuart Yoder <stuart.yoder@nxp.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | RE: [PATCH v3 1/9] staging: fsl-mc: move bus driver out of staging |
| Date | 2016-12-09 18:30 +0100 |
| Message-ID | <sMx9E-64e-11@gated-at.bofh.it> (permalink) |
| References | (2 earlier) <sLMNs-1Yv-13@gated-at.bofh.it> <sLQR3-4Lk-3@gated-at.bofh.it> <sM9qF-8e6-3@gated-at.bofh.it> <sMi0W-53T-3@gated-at.bofh.it> <sMnDk-kG-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
> > > Where is the device freed? I see you trying to do some "odd" stuff in
> > > fsl_mc_device_remove() by deleting and then putting a device structure.
> > > I can't find a "release()" callback anywhere for your bus, where is it?
> > >
> > > What happens when the reference count falls to 0 for your struct device?
> >
> > Hrm...something seems wrong in free path, and I think this needs to
> > be refactored.
> >
> > IIRC, when German (former maintainer) wrote that code he loosely based
> > it on the register/unregister platform bus code:
> >
> > int platform_device_register(struct platform_device *pdev)
> > {
> > device_initialize(&pdev->dev);
> > arch_setup_pdev_archdata(pdev);
> > return platform_device_add(pdev);
> > }
> > void platform_device_unregister(struct platform_device *pdev)
> > {
> > platform_device_del(pdev);
> > platform_device_put(pdev);
> > }
> >
> > ...I'm puzzling over how that code handles a refcount of zero
> > as I see no 'release' callback anywhere, but I must be missing
> > something.
> >
> > In any case, we'll get this refactored.
>
> Have you tried removing a device? The kernel should complain loudly
> about there not being a release function for your device.
Yes, device removal has been working from day 1. A brief look
seems to indicate that the ref count never goes to zero, which
needs to be debugged.
Thanks,
Stuart
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: [PATCH v3 1/9] staging: fsl-mc: move bus driver out of staging Greg KH <gregkh@linuxfoundation.org> - 2016-12-07 17:00 +0100
RE: [PATCH v3 1/9] staging: fsl-mc: move bus driver out of staging Stuart Yoder <stuart.yoder@nxp.com> - 2016-12-07 21:20 +0100
Re: [PATCH v3 1/9] staging: fsl-mc: move bus driver out of staging Greg KH <gregkh@linuxfoundation.org> - 2016-12-08 17:10 +0100
RE: [PATCH v3 1/9] staging: fsl-mc: move bus driver out of staging Stuart Yoder <stuart.yoder@nxp.com> - 2016-12-09 02:20 +0100
Re: [PATCH v3 1/9] staging: fsl-mc: move bus driver out of staging Greg KH <gregkh@linuxfoundation.org> - 2016-12-09 08:20 +0100
RE: [PATCH v3 1/9] staging: fsl-mc: move bus driver out of staging Stuart Yoder <stuart.yoder@nxp.com> - 2016-12-09 18:30 +0100
csiph-web