Skip to content

Commit 05212be

Browse files
jluebbetorvalds
authored andcommitted
drivers/pps/clients/pps-gpio.c: convert to module_platform_driver
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>
1 parent 2a65182 commit 05212be

1 file changed

Lines changed: 1 addition & 17 deletions

File tree

‎drivers/pps/clients/pps-gpio.c‎

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -187,23 +187,7 @@ static struct platform_driver pps_gpio_driver = {
187187
},
188188
};
189189

190-
static int __init pps_gpio_init(void)
191-
{
192-
int ret = platform_driver_register(&pps_gpio_driver);
193-
if (ret < 0)
194-
pr_err("failed to register platform driver\n");
195-
return ret;
196-
}
197-
198-
static void __exit pps_gpio_exit(void)
199-
{
200-
platform_driver_unregister(&pps_gpio_driver);
201-
pr_debug("unregistered platform driver\n");
202-
}
203-
204-
module_init(pps_gpio_init);
205-
module_exit(pps_gpio_exit);
206-
190+
module_platform_driver(pps_gpio_driver);
207191
MODULE_AUTHOR("Ricardo Martins <rasm@fe.up.pt>");
208192
MODULE_AUTHOR("James Nuss <jamesnuss@nanometrics.ca>");
209193
MODULE_DESCRIPTION("Use GPIO pin as PPS source");

0 commit comments

Comments
 (0)