On Mon, 4 Feb 2013 09:26:26 -0300, Ezequiel Garcia <ezequiel.gar...@free-electrons.com> wrote: > This patch reduces and simplifies initalization code by > using module_platform_driver(). > With this change it's necessary to remove the __init annotation > to avoid section mismatch warnings. > > Signed-off-by: Ezequiel Garcia <ezequiel.gar...@free-electrons.com>
Applied, thanks. g. > --- > drivers/spi/spi-orion.c | 15 +++------------ > 1 files changed, 3 insertions(+), 12 deletions(-) > > diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c > index b7e7182..d8cbf20 100644 > --- a/drivers/spi/spi-orion.c > +++ b/drivers/spi/spi-orion.c > @@ -396,7 +396,7 @@ static int orion_spi_setup(struct spi_device *spi) > return 0; > } > > -static int __init orion_spi_probe(struct platform_device *pdev) > +static int orion_spi_probe(struct platform_device *pdev) > { > struct spi_master *master; > struct orion_spi *spi; > @@ -513,20 +513,11 @@ static struct platform_driver orion_spi_driver = { > .owner = THIS_MODULE, > .of_match_table = of_match_ptr(orion_spi_of_match_table), > }, > + .probe = orion_spi_probe, > .remove = __exit_p(orion_spi_remove), > }; > > -static int __init orion_spi_init(void) > -{ > - return platform_driver_probe(&orion_spi_driver, orion_spi_probe); > -} > -module_init(orion_spi_init); > - > -static void __exit orion_spi_exit(void) > -{ > - platform_driver_unregister(&orion_spi_driver); > -} > -module_exit(orion_spi_exit); > +module_platform_driver(orion_spi_driver); > > MODULE_DESCRIPTION("Orion SPI driver"); > MODULE_AUTHOR("Shadi Ammouri <sh...@marvell.com>"); > -- > 1.7.8.6 > -- Grant Likely, B.Sc, P.Eng. Secret Lab Technologies, Ltd. ------------------------------------------------------------------------------ Free Next-Gen Firewall Hardware Offer Buy your Sophos next-gen firewall before the end March 2013 and get the hardware for free! Learn more. http://p.sf.net/sfu/sophos-d2d-feb _______________________________________________ spi-devel-general mailing list spi-devel-general@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/spi-devel-general