Skip to content

Commit

Permalink
misc: atmel_pwm: use module_platform_driver_probe()
Browse files Browse the repository at this point in the history
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jingoo Han authored and gregkh committed Mar 15, 2013
1 parent 0c75948 commit 4022ed5
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/misc/atmel_pwm.c
Original file line number Diff line number Diff line change
Expand Up @@ -393,17 +393,7 @@ static struct platform_driver atmel_pwm_driver = {
*/
};

static int __init pwm_init(void)
{
return platform_driver_probe(&atmel_pwm_driver, pwm_probe);
}
module_init(pwm_init);

static void __exit pwm_exit(void)
{
platform_driver_unregister(&atmel_pwm_driver);
}
module_exit(pwm_exit);
module_platform_driver_probe(atmel_pwm_driver, pwm_probe);

MODULE_DESCRIPTION("Driver for AT32/AT91 PWM module");
MODULE_LICENSE("GPL");
Expand Down

0 comments on commit 4022ed5

Please sign in to comment.