Skip to content

Commit d023d32

Browse files
committed
(submitted) drivers: gpio: da9055: use subsys_platform_driver()
Reduce driver init boilerplate by using the new subsys_platform_driver() macro. Signed-off-by: Enrico Weigelt <info@metux.net> Submitted: 2019-06-17
1 parent c3fe9da commit d023d32

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/gpio/gpio-da9055.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -163,18 +163,7 @@ static struct platform_driver da9055_gpio_driver = {
163163
.name = "da9055-gpio",
164164
},
165165
};
166-
167-
static int __init da9055_gpio_init(void)
168-
{
169-
return platform_driver_register(&da9055_gpio_driver);
170-
}
171-
subsys_initcall(da9055_gpio_init);
172-
173-
static void __exit da9055_gpio_exit(void)
174-
{
175-
platform_driver_unregister(&da9055_gpio_driver);
176-
}
177-
module_exit(da9055_gpio_exit);
166+
subsys_platform_driver(da9055_gpio_driver);
178167

179168
MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>");
180169
MODULE_DESCRIPTION("DA9055 GPIO Device Driver");

0 commit comments

Comments
 (0)