diff options
author | Bo Shen <voice.shen@atmel.com> | 2012-10-15 23:56:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-06 04:11:32 -0500 |
commit | 5c86ac695c7e2402f60e30ad8174ceb66ef22a91 (patch) | |
tree | e5a5f629265035792859f23e452d18038e9d3e37 /drivers/misc/atmel-ssc.c | |
parent | 2e4de7b32adc239d566cd02751c31d0847f68e86 (diff) |
ASoC: atmel-ssc: use module_platform_driver macro
This patch removes some code duplication by using module_platform_driver
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/misc/atmel-ssc.c')
-rw-r--r-- | drivers/misc/atmel-ssc.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/drivers/misc/atmel-ssc.c b/drivers/misc/atmel-ssc.c index 23dcb76abdaf..ac00f83ea86b 100644 --- a/drivers/misc/atmel-ssc.c +++ b/drivers/misc/atmel-ssc.c | |||
@@ -68,7 +68,7 @@ void ssc_free(struct ssc_device *ssc) | |||
68 | } | 68 | } |
69 | EXPORT_SYMBOL(ssc_free); | 69 | EXPORT_SYMBOL(ssc_free); |
70 | 70 | ||
71 | static int __init ssc_probe(struct platform_device *pdev) | 71 | static int ssc_probe(struct platform_device *pdev) |
72 | { | 72 | { |
73 | struct resource *regs; | 73 | struct resource *regs; |
74 | struct ssc_device *ssc; | 74 | struct ssc_device *ssc; |
@@ -135,24 +135,14 @@ static int __devexit ssc_remove(struct platform_device *pdev) | |||
135 | } | 135 | } |
136 | 136 | ||
137 | static struct platform_driver ssc_driver = { | 137 | static struct platform_driver ssc_driver = { |
138 | .remove = __devexit_p(ssc_remove), | ||
139 | .driver = { | 138 | .driver = { |
140 | .name = "ssc", | 139 | .name = "ssc", |
141 | .owner = THIS_MODULE, | 140 | .owner = THIS_MODULE, |
142 | }, | 141 | }, |
142 | .probe = ssc_probe, | ||
143 | .remove = __devexit_p(ssc_remove), | ||
143 | }; | 144 | }; |
144 | 145 | module_platform_driver(ssc_driver); | |
145 | static int __init ssc_init(void) | ||
146 | { | ||
147 | return platform_driver_probe(&ssc_driver, ssc_probe); | ||
148 | } | ||
149 | module_init(ssc_init); | ||
150 | |||
151 | static void __exit ssc_exit(void) | ||
152 | { | ||
153 | platform_driver_unregister(&ssc_driver); | ||
154 | } | ||
155 | module_exit(ssc_exit); | ||
156 | 146 | ||
157 | MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); | 147 | MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); |
158 | MODULE_DESCRIPTION("SSC driver for Atmel AVR32 and AT91"); | 148 | MODULE_DESCRIPTION("SSC driver for Atmel AVR32 and AT91"); |