adding of_platform_drivers (was: Re: [RESEND][PATCH] uio: Add of_platform_driver to uio_pdrv_genirq)

Wolfram Sang w.sang at pengutronix.de
Tue Dec 16 23:27:32 EST 2008


> > +/* ---------------------------------------------------------------------
> > + * OF bus binding
> > + */
> > +
> > +#if defined(CONFIG_OF)
> 
> Same goes here, don't put #if in .c files please.

So, generally speaking, this means that I should not put a
platform_driver and an of_platform_driver into one source file, but
rather create an of_$DRIVER.c then? I found both ways used in the kernel
and could not find hints about the preferred way to do it. I took this
approach as I hoped it would save some code to directly convert the
of_node to uioinfo without the detour of using a platform_device
inbetween.

Kind regards,

   Wolfram

-- 
  Dipl.-Ing. Wolfram Sang | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20081216/09b889ec/attachment.pgp>


More information about the Linuxppc-dev mailing list