Skip to content

Commit

Permalink
drivers/video/backlight/atmel-pwm-bl.c: use module_platform_driver_pr…
Browse files Browse the repository at this point in the history
…obe()

Use the module_platform_driver_probe() macro which makes the code
smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jingoo Han authored and Linus Torvalds committed Apr 30, 2013
1 parent cb1fbb8 commit 6ea0b2f
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions drivers/video/backlight/atmel-pwm-bl.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,17 +225,7 @@ static struct platform_driver atmel_pwm_bl_driver = {
.remove = __exit_p(atmel_pwm_bl_remove),
};

static int __init atmel_pwm_bl_init(void)
{
return platform_driver_probe(&atmel_pwm_bl_driver, atmel_pwm_bl_probe);
}
module_init(atmel_pwm_bl_init);

static void __exit atmel_pwm_bl_exit(void)
{
platform_driver_unregister(&atmel_pwm_bl_driver);
}
module_exit(atmel_pwm_bl_exit);
module_platform_driver_probe(atmel_pwm_bl_driver, atmel_pwm_bl_probe);

MODULE_AUTHOR("Hans-Christian egtvedt <hans-christian.egtvedt@atmel.com>");
MODULE_DESCRIPTION("Atmel PWM backlight driver");
Expand Down

0 comments on commit 6ea0b2f

Please sign in to comment.