[PATCH] mpc52xx-psc-spi: refactor probe and remove to make use of of_register_spi_devices()

Wolfram Sang w.sang at pengutronix.de
Sat Oct 31 20:03:56 EST 2009


Hi Stephen,

> >  static struct of_platform_driver mpc52xx_psc_spi_of_driver = {
> >  	.owner = THIS_MODULE,
> > -	.name = "mpc52xx-psc-spi",
> > +	.name = DRIVER_NAME,
> 
> You no longer need to set either owner or name in the of_platform driver,
> just in the included struct driver (as is done below), so you could just
> remove the above two lines.

Okay, thanks. Will drop it.

> 
> >  	.match_table = mpc52xx_psc_spi_of_match,
> >  	.probe = mpc52xx_psc_spi_of_probe,
> >  	.remove = __exit_p(mpc52xx_psc_spi_of_remove),
> >  	.driver = {
> > -		.name = "mpc52xx-psc-spi",
> > +		.name = DRIVER_NAME,
> >  		.owner = THIS_MODULE,
> >  	},
> >  };
> 
> I am hoping that we can remove the owner and name fields from struct
> of_platform_driver sometime.

Sounds good! :)

Regards,

   Wolfram

-- 
Pengutronix e.K.                           | Wolfram Sang                |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
-------------- 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/20091031/19a236fe/attachment.pgp>


More information about the Linuxppc-dev mailing list