Commit 6e1cf66e authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarRyan Mallon <rmallon@gmail.com>
Cc: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ddfd6894
...@@ -215,7 +215,7 @@ static const struct attribute_group ep93xx_pwm_sysfs_files = { ...@@ -215,7 +215,7 @@ static const struct attribute_group ep93xx_pwm_sysfs_files = {
.attrs = ep93xx_pwm_attrs, .attrs = ep93xx_pwm_attrs,
}; };
static int __init ep93xx_pwm_probe(struct platform_device *pdev) static int ep93xx_pwm_probe(struct platform_device *pdev)
{ {
struct ep93xx_pwm *pwm; struct ep93xx_pwm *pwm;
struct resource *res; struct resource *res;
...@@ -257,7 +257,7 @@ static int __init ep93xx_pwm_probe(struct platform_device *pdev) ...@@ -257,7 +257,7 @@ static int __init ep93xx_pwm_probe(struct platform_device *pdev)
return 0; return 0;
} }
static int __exit ep93xx_pwm_remove(struct platform_device *pdev) static int ep93xx_pwm_remove(struct platform_device *pdev)
{ {
struct ep93xx_pwm *pwm = platform_get_drvdata(pdev); struct ep93xx_pwm *pwm = platform_get_drvdata(pdev);
...@@ -274,10 +274,10 @@ static struct platform_driver ep93xx_pwm_driver = { ...@@ -274,10 +274,10 @@ static struct platform_driver ep93xx_pwm_driver = {
.name = "ep93xx-pwm", .name = "ep93xx-pwm",
.owner = THIS_MODULE, .owner = THIS_MODULE,
}, },
.remove = __exit_p(ep93xx_pwm_remove), .probe = ep93xx_pwm_probe,
.remove = ep93xx_pwm_remove,
}; };
module_platform_driver(ep93xx_pwm_driver);
module_platform_driver_probe(ep93xx_pwm_driver, ep93xx_pwm_probe);
MODULE_AUTHOR("Matthieu Crapet <mcrapet@gmail.com>, " MODULE_AUTHOR("Matthieu Crapet <mcrapet@gmail.com>, "
"H Hartley Sweeten <hsweeten@visionengravers.com>"); "H Hartley Sweeten <hsweeten@visionengravers.com>");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment