From: Sachin Kamat Date: Thu, 29 May 2014 11:51:01 +0000 (+0530) Subject: usb: host: max3421-hcd: Use module_spi_driver X-Git-Tag: firefly_0821_release~176^2~3465^2~37^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7df45d5fc2c951ad89c90d7b201b08eb006c11d9;p=firefly-linux-kernel-4.4.55.git usb: host: max3421-hcd: Use module_spi_driver module_spi_driver simplifies the code by eliminating boilerplate code. Signed-off-by: Sachin Kamat Acked-by: David Mosberger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/max3421-hcd.c b/drivers/usb/host/max3421-hcd.c index fd3ed994fa4d..858efcfda50b 100644 --- a/drivers/usb/host/max3421-hcd.c +++ b/drivers/usb/host/max3421-hcd.c @@ -1950,20 +1950,7 @@ static struct spi_driver max3421_driver = { }, }; -static int __init -max3421_mod_init(void) -{ - return spi_register_driver(&max3421_driver); -} - -static void __exit -max3421_mod_exit(void) -{ - spi_unregister_driver(&max3421_driver); -} - -module_init(max3421_mod_init); -module_exit(max3421_mod_exit); +module_spi_driver(max3421_driver); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_AUTHOR("David Mosberger ");