Re: powerpc_flash_init(), wtf!?

David Gibson
2007-05-04T01:28:35Z

On Fri, May 04, 2007 at 04:30:56AM +0400, Vitaly Bordug wrote:
> On Thu, 03 May 2007 22:29:13 +1000
> Benjamin Herrenschmidt wrote:
>
> >
> > > It doesn't seem a flexible enough approach. We could continue
> > > using platform devices then.
> >
> > The problem is trivial enough tho... who ends up creating an
> > of_platform_device for that rom node ... to be picked up by the
> > driver.
> >
> > Creating of_platform devices is platform code responsibility... either
> > by calling of_platform_bus_probe() (or whatever I called it ...) to
> > generate them from known bus type or by creating them directly, that
> > doesn't matter, that's still platform code business.
> >
> Still, there is code duplication problem.
>
> So, assuming we'd need 6 lines of code to do it properly in platform
> code, we may face tens of different targets that require exactly the
> same process to provide mtd of_devices stuff.

So make a helper function.

--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!