Message ID | CAPgLHd9e+T7UVET28Xe3RP05s2jVJdLx4TRtw3V635+HnKjnZA@mail.gmail.com (mailing list archive) |
---|---|
State | Not Applicable, archived |
Headers | show |
On Thu, May 30, 2013 at 07:42:54PM +0800, Wei Yongjun wrote: > From: Wei Yongjun <yongjun_wei@trendmicro.com.cn> > > module_spi_driver() makes the code simpler by eliminating > boilerplate code. > > Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: Solomon Peachy <pizza@shaftnet.org> > --- > drivers/net/wireless/cw1200/cw1200_spi.c | 15 +-------------- > 1 file changed, 1 insertion(+), 14 deletions(-) > > diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c > index 04af685..1e6c58d 100644 > --- a/drivers/net/wireless/cw1200/cw1200_spi.c > +++ b/drivers/net/wireless/cw1200/cw1200_spi.c > @@ -464,17 +464,4 @@ static struct spi_driver spi_driver = { > }, > }; > > -/* Init Module function -> Called by insmod */ > -static int __init cw1200_spi_init(void) > -{ > - return spi_register_driver(&spi_driver); > -} > - > -/* Called at Driver Unloading */ > -static void __exit cw1200_spi_exit(void) > -{ > - spi_unregister_driver(&spi_driver); > -} > - > -module_init(cw1200_spi_init); > -module_exit(cw1200_spi_exit); > +module_spi_driver(spi_driver); > > -- > To unsubscribe from this list: send the line "unsubscribe linux-wireless" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c index 04af685..1e6c58d 100644 --- a/drivers/net/wireless/cw1200/cw1200_spi.c +++ b/drivers/net/wireless/cw1200/cw1200_spi.c @@ -464,17 +464,4 @@ static struct spi_driver spi_driver = { }, }; -/* Init Module function -> Called by insmod */ -static int __init cw1200_spi_init(void) -{ - return spi_register_driver(&spi_driver); -} - -/* Called at Driver Unloading */ -static void __exit cw1200_spi_exit(void) -{ - spi_unregister_driver(&spi_driver); -} - -module_init(cw1200_spi_init); -module_exit(cw1200_spi_exit); +module_spi_driver(spi_driver);