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

Stephen Rothwell sfr at canb.auug.org.au
Tue Nov 6 03:28:46 CET 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.lm-sensors.org/pipermail/i2c/attachments/20071106/0e6ab895/attachment.bin 


More information about the i2c mailing list