[RFC] Rework of i2c-mpc.c - Freescale i2c driver

Stephen Rothwell sfr at canb.auug.org.au
Tue Nov 6 13:28:46 EST 2007


On Mon, 5 Nov 2007 20:34:51 -0500 "Jon Smirl" <jonsmirl at gmail.com> wrote:
>
> On 11/5/07, Scott Wood <scottwood at freescale.com> wrote:
> > > +static struct of_platform_driver mpc_i2c_driver = {
> > > +     .owner          = THIS_MODULE,
> > > +     .name           = DRV_NAME,
> > > +     .match_table    = mpc_i2c_of_match,
> > > +     .probe          = mpc_i2c_probe,
> > > +     .remove         = __devexit_p(mpc_i2c_remove),
> > > +     .driver         = {
> > > +             .name   = DRV_NAME,
> > >       },
> > >  };
> >
> > Do we still need .name if we have .driver.name?
> 
> This is a general question, if of_platform_driver doesn't need .name
> it should be removed from the structure.

I am in the process of doing that.  However there a quite a few drivers
that need to be fixed first.  In the meantime,
of_register_platform_driver will copy which ever of the name and owner
fields you fill in to the others, so we can convert over time.  For new
drivers (and changing), please use the name and owner fields in the
embedded device_driver struct. (this is the same as done by the platform
drivers currently ...)

-- 
Cheers,
Stephen Rothwell                    sfr at canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20071106/0e6ab895/attachment.pgp>


More information about the Linuxppc-dev mailing list