kernel: ath79, bmips: refresh 5.15 patches
[openwrt/openwrt.git] / target / linux / ath79 / patches-5.15 / 340-register_gpio_driver_earlier.patch
1 From: John Crispin <john@phrozen.org>
2 Subject: ath79: Register GPIO driver earlier
3
4 HACK: register the GPIO driver earlier to ensure that gpio_request calls
5 from mach files succeed.
6
7 Submitted-by: John Crispin <john@phrozen.org>
8 ---
9 drivers/gpio/gpio-ath79.c | 6 +++++-
10 1 file changed, 5 insertions(+), 1 deletion(-)
11
12 --- a/drivers/gpio/gpio-ath79.c
13 +++ b/drivers/gpio/gpio-ath79.c
14 @@ -297,7 +297,11 @@ static struct platform_driver ath79_gpio
15 .probe = ath79_gpio_probe,
16 };
17
18 -module_platform_driver(ath79_gpio_driver);
19 +static int __init ath79_gpio_init(void)
20 +{
21 + return platform_driver_register(&ath79_gpio_driver);
22 +}
23 +postcore_initcall(ath79_gpio_init);
24
25 MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X GPIO API support");
26 MODULE_LICENSE("GPL v2");