diff options
author | H Hartley Sweeten <hartleys@visionengravers.com> | 2013-05-24 19:28:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-30 08:54:06 -0400 |
commit | 6e1cf66ee3105b41ec93a3848e848ae682add3ff (patch) | |
tree | ed8922dc983ec2187e4283a54c5c4f9a41e83b93 | |
parent | ddfd6894db8d1c1a5b5e532283aee1f3afd880b9 (diff) |
misc/ep93xx_pwm: use module_platform_driver()
Add the (*probe) function to the platform_driver and use the
module_platform_driver() macro to initialize the module.
Remove the unnecessary __init and __exit tags.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Cc: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/ep93xx_pwm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/misc/ep93xx_pwm.c b/drivers/misc/ep93xx_pwm.c index dd570d1d2245..b5ad0c6a5af1 100644 --- a/drivers/misc/ep93xx_pwm.c +++ b/drivers/misc/ep93xx_pwm.c | |||
@@ -215,7 +215,7 @@ static const struct attribute_group ep93xx_pwm_sysfs_files = { | |||
215 | .attrs = ep93xx_pwm_attrs, | 215 | .attrs = ep93xx_pwm_attrs, |
216 | }; | 216 | }; |
217 | 217 | ||
218 | static int __init ep93xx_pwm_probe(struct platform_device *pdev) | 218 | static int ep93xx_pwm_probe(struct platform_device *pdev) |
219 | { | 219 | { |
220 | struct ep93xx_pwm *pwm; | 220 | struct ep93xx_pwm *pwm; |
221 | struct resource *res; | 221 | struct resource *res; |
@@ -257,7 +257,7 @@ static int __init ep93xx_pwm_probe(struct platform_device *pdev) | |||
257 | return 0; | 257 | return 0; |
258 | } | 258 | } |
259 | 259 | ||
260 | static int __exit ep93xx_pwm_remove(struct platform_device *pdev) | 260 | static int ep93xx_pwm_remove(struct platform_device *pdev) |
261 | { | 261 | { |
262 | struct ep93xx_pwm *pwm = platform_get_drvdata(pdev); | 262 | struct ep93xx_pwm *pwm = platform_get_drvdata(pdev); |
263 | 263 | ||
@@ -274,10 +274,10 @@ static struct platform_driver ep93xx_pwm_driver = { | |||
274 | .name = "ep93xx-pwm", | 274 | .name = "ep93xx-pwm", |
275 | .owner = THIS_MODULE, | 275 | .owner = THIS_MODULE, |
276 | }, | 276 | }, |
277 | .remove = __exit_p(ep93xx_pwm_remove), | 277 | .probe = ep93xx_pwm_probe, |
278 | .remove = ep93xx_pwm_remove, | ||
278 | }; | 279 | }; |
279 | 280 | module_platform_driver(ep93xx_pwm_driver); | |
280 | module_platform_driver_probe(ep93xx_pwm_driver, ep93xx_pwm_probe); | ||
281 | 281 | ||
282 | MODULE_AUTHOR("Matthieu Crapet <mcrapet@gmail.com>, " | 282 | MODULE_AUTHOR("Matthieu Crapet <mcrapet@gmail.com>, " |
283 | "H Hartley Sweeten <hsweeten@visionengravers.com>"); | 283 | "H Hartley Sweeten <hsweeten@visionengravers.com>"); |