aboutsummaryrefslogtreecommitdiff
path: root/drivers/misc/ti_dac7512.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-01-22 15:38:22 +0800
committerGreg Kroah-Hartman <gregkh@suse.de>2012-01-24 16:31:49 -0800
commita3dc3c9eb0a7bcf17604ee444c48b94e2591812d (patch)
tree8968e8592deceaa60f40b26a316235ce9eb4ed6a /drivers/misc/ti_dac7512.c
parenta64fe2ed76614d37abb6966a67f4f39d10efba3c (diff)
MISC: convert drivers/misc/* to use module_spi_driver()
This patch converts the drivers in drivers/misc/* to use the module_spi_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: Michael Hennerich <hennerich@blackfin.uclinux.org> Cc: Anatolij Gustschin <agust@denx.de> Cc: Daniel Mack <zonque@gmail.com> Acked-by: Michael Hennerich <michael.hennerich@analog.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/misc/ti_dac7512.c')
-rw-r--r--drivers/misc/ti_dac7512.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/misc/ti_dac7512.c b/drivers/misc/ti_dac7512.c
index d3f229a3a77..5acbba120de 100644
--- a/drivers/misc/ti_dac7512.c
+++ b/drivers/misc/ti_dac7512.c
@@ -82,20 +82,9 @@ static struct spi_driver dac7512_driver = {
.remove = __devexit_p(dac7512_remove),
};
-static int __init dac7512_init(void)
-{
- return spi_register_driver(&dac7512_driver);
-}
-
-static void __exit dac7512_exit(void)
-{
- spi_unregister_driver(&dac7512_driver);
-}
+module_spi_driver(dac7512_driver);
MODULE_AUTHOR("Daniel Mack <daniel@caiaq.de>");
MODULE_DESCRIPTION("DAC7512 16-bit DAC");
MODULE_LICENSE("GPL v2");
MODULE_VERSION(DRIVER_VERSION);
-
-module_init(dac7512_init);
-module_exit(dac7512_exit);