Re: [PATCH] move omap_udc's probe function to .devinit.text

From: David Brownell
Date: Sun Jul 12 2009 - 05:38:16 EST


On Sunday 12 July 2009, Uwe Kleine-König wrote:
>
> > Repeat -- NAK on this.  Use platform_driver_probe() instead.
> >
> > I really don't like this series of patches.  It's just adding
> > bloat to kernels, in chunks of up to a page per patch.
>
> I'm aware that in some cases platform_driver_probe is better.

Make that "most cases". It's rare that platform devices get
hotplugged. Mostly they're set up at system init ... often
it's all done by the time arch_initcall() finishes.


> But as I
> don't have access to most of the affected platforms I consider it saver.
> That's why I choosed this way.

You do have access to the source tree, and a powerful little
tool called "grep -r" ... which can easily tell you where the
devices for those platforms are defined. And thus let you see
if a given one happens to be one of the exceptional cases where
platform_driver_probe() won't work.


> The problem with platform_driver_probe
> is that if a device is added only after the driver is probed the
> device isn't bound.

That's rarely a problem though; it certainly isn't in the case of
the $SUBJECT driver, and others on that platform. I've pointed
that out to you before.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/