Skip to content

Commit

Permalink
drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
Browse files Browse the repository at this point in the history
This removes some boilerplate code (no functional changes).

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Jan Luebbe authored and Linus Torvalds committed Jul 3, 2013
1 parent 2a65182 commit 05212be
Showing 1 changed file with 1 addition and 17 deletions.
18 changes: 1 addition & 17 deletions drivers/pps/clients/pps-gpio.c
Original file line number Diff line number Diff line change
@@ -187,23 +187,7 @@ static struct platform_driver pps_gpio_driver = {
},
};

static int __init pps_gpio_init(void)
{
int ret = platform_driver_register(&pps_gpio_driver);
if (ret < 0)
pr_err("failed to register platform driver\n");
return ret;
}

static void __exit pps_gpio_exit(void)
{
platform_driver_unregister(&pps_gpio_driver);
pr_debug("unregistered platform driver\n");
}

module_init(pps_gpio_init);
module_exit(pps_gpio_exit);

module_platform_driver(pps_gpio_driver);
MODULE_AUTHOR("Ricardo Martins <rasm@fe.up.pt>");
MODULE_AUTHOR("James Nuss <jamesnuss@nanometrics.ca>");
MODULE_DESCRIPTION("Use GPIO pin as PPS source");

0 comments on commit 05212be

Please sign in to comment.