diff options
author | Bo Shen <voice.shen@atmel.com> | 2012-10-16 05:56:59 +0200 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-11-06 10:11:32 +0100 |
commit | 5c86ac695c7e2402f60e30ad8174ceb66ef22a91 (patch) | |
tree | e5a5f629265035792859f23e452d18038e9d3e37 /drivers/misc/atmel-ssc.c | |
parent | ASoC: atmel-ssc: use devm_xxx() managed function (diff) | |
download | linux-5c86ac695c7e2402f60e30ad8174ceb66ef22a91.tar.xz linux-5c86ac695c7e2402f60e30ad8174ceb66ef22a91.zip |
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) } EXPORT_SYMBOL(ssc_free); -static int __init ssc_probe(struct platform_device *pdev) +static int ssc_probe(struct platform_device *pdev) { struct resource *regs; struct ssc_device *ssc; @@ -135,24 +135,14 @@ static int __devexit ssc_remove(struct platform_device *pdev) } static struct platform_driver ssc_driver = { - .remove = __devexit_p(ssc_remove), .driver = { .name = "ssc", .owner = THIS_MODULE, }, + .probe = ssc_probe, + .remove = __devexit_p(ssc_remove), }; - -static int __init ssc_init(void) -{ - return platform_driver_probe(&ssc_driver, ssc_probe); -} -module_init(ssc_init); - -static void __exit ssc_exit(void) -{ - platform_driver_unregister(&ssc_driver); -} -module_exit(ssc_exit); +module_platform_driver(ssc_driver); MODULE_AUTHOR("Hans-Christian Egtvedt <hcegtvedt@atmel.com>"); MODULE_DESCRIPTION("SSC driver for Atmel AVR32 and AT91"); |