[PATCH v2 1/5] phy: Add driver for Exynos MIPI CSIS/DSIM DPHYs

Felipe Balbi balbi at ti.com
Thu Jun 27 03:51:00 EDT 2013


On Thu, Jun 27, 2013 at 09:47:47AM +0200, Andrzej Hajda wrote:
> Hi Felipe,
> 
> On 06/27/2013 08:17 AM, Felipe Balbi wrote:
> > On Wed, Jun 26, 2013 at 05:00:34PM +0200, Sylwester Nawrocki wrote:
> >> Hi,
> >>
> >> On 06/25/2013 05:06 PM, Felipe Balbi wrote:
> >>>> +static struct platform_driver exynos_video_phy_driver = {
> >>>>> +	.probe	= exynos_video_phy_probe,
> >>>
> >>> you *must* provide a remove method. drivers with NULL remove are
> >>> non-removable :-)
> >>
> >> Actually the remove() callback can be NULL, it's just missing module_exit
> >> function that makes a module not unloadable.
> > 
> > look at the implementation of platform_drv_remove():
> > 
> >  499 static int platform_drv_remove(struct device *_dev)
> >  500 {
> >  501         struct platform_driver *drv = to_platform_driver(_dev->driver);
> >  502         struct platform_device *dev = to_platform_device(_dev);
> >  503         int ret;
> >  504 
> >  505         ret = drv->remove(dev);
> >  506         if (ACPI_HANDLE(_dev))
> >  507                 acpi_dev_pm_detach(_dev, true);
> >  508 
> >  509         return ret;
> >  510 }
> > 
> > that's not a conditional call right :-)
> 
> It is conditional, just condition check is in different place:
> 
> int platform_driver_register(struct platform_driver *drv)
> {
> 	(...)
> 	if (drv->remove)
> 		drv->driver.remove = platform_drv_remove;
> 	(...)
> }

good point :-) thanks. I'll go ack your driver now

-- 
balbi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130627/85af30d3/attachment.sig>


More information about the linux-arm-kernel mailing list