projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
09a0d18
)
leds: convert leds-dac124s085 to module_spi_driver
author
Axel Lin
<
[email protected]
>
Tue, 10 Jan 2012 23:09:30 +0000
(15:09 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 11 Jan 2012 00:30:49 +0000
(16:30 -0800)
Factor out some boilerplate code for spi driver registration into
module_spi_driver.
Signed-off-by: Axel Lin <
[email protected]
>
Cc: Haojian Zhuang <
[email protected]
>
Cc: Mark Brown <
[email protected]
>
Cc: Richard Purdie <
[email protected]
>
Cc: Michael Hennerich <
[email protected]
>
Cc: Mike Rapoport <
[email protected]
>
Acked-by: Guennadi Liakhovetski <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/leds/leds-dac124s085.c
patch
|
blob
|
history
diff --git
a/drivers/leds/leds-dac124s085.c
b/drivers/leds/leds-dac124s085.c
index 31cf0d60a9a546052e782d5177b8461c9673d941..d56c14269ff0c7e9c5e40992f689919024cef7bd 100644
(file)
--- a/
drivers/leds/leds-dac124s085.c
+++ b/
drivers/leds/leds-dac124s085.c
@@
-131,18
+131,7
@@
static struct spi_driver dac124s085_driver = {
},
};
-static int __init dac124s085_leds_init(void)
-{
- return spi_register_driver(&dac124s085_driver);
-}
-
-static void __exit dac124s085_leds_exit(void)
-{
- spi_unregister_driver(&dac124s085_driver);
-}
-
-module_init(dac124s085_leds_init);
-module_exit(dac124s085_leds_exit);
+module_spi_driver(dac124s085_driver);
MODULE_AUTHOR("Guennadi Liakhovetski <
[email protected]
>");
MODULE_DESCRIPTION("DAC124S085 LED driver");