From: H Hartley Sweeten Date: Fri, 24 May 2013 23:28:14 +0000 (-0700) Subject: misc/ep93xx_pwm: use module_platform_driver() X-Git-Tag: firefly_0821_release~176^2~5844^2~67 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6e1cf66ee3105b41ec93a3848e848ae682add3ff;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Arnd Bergmann Reviewed-by: Ryan Mallon Cc: Matthieu Crapet Signed-off-by: Greg Kroah-Hartman --- 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 = { .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 resource *res; @@ -257,7 +257,7 @@ static int __init ep93xx_pwm_probe(struct platform_device *pdev) 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); @@ -274,10 +274,10 @@ static struct platform_driver ep93xx_pwm_driver = { .name = "ep93xx-pwm", .owner = THIS_MODULE, }, - .remove = __exit_p(ep93xx_pwm_remove), + .probe = ep93xx_pwm_probe, + .remove = ep93xx_pwm_remove, }; - -module_platform_driver_probe(ep93xx_pwm_driver, ep93xx_pwm_probe); +module_platform_driver(ep93xx_pwm_driver); MODULE_AUTHOR("Matthieu Crapet , " "H Hartley Sweeten ");