X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fath79%2Fpatches-6.1%2F340-register_gpio_driver_earlier.patch;fp=target%2Flinux%2Fath79%2Fpatches-6.1%2F340-register_gpio_driver_earlier.patch;h=48ce7e1d7155c67caa92247b2e661441a6cdb8d4;hb=d123330aa93a2d09f7dff039a2351d947d4fd8f7;hp=0000000000000000000000000000000000000000;hpb=7d01a0b436ac242e618f86d4eede141968e2e2f8;p=openwrt%2Fopenwrt.git diff --git a/target/linux/ath79/patches-6.1/340-register_gpio_driver_earlier.patch b/target/linux/ath79/patches-6.1/340-register_gpio_driver_earlier.patch new file mode 100644 index 0000000000..48ce7e1d71 --- /dev/null +++ b/target/linux/ath79/patches-6.1/340-register_gpio_driver_earlier.patch @@ -0,0 +1,26 @@ +From: John Crispin +Subject: ath79: Register GPIO driver earlier + +HACK: register the GPIO driver earlier to ensure that gpio_request calls +from mach files succeed. + +Submitted-by: John Crispin +--- + drivers/gpio/gpio-ath79.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +--- a/drivers/gpio/gpio-ath79.c ++++ b/drivers/gpio/gpio-ath79.c +@@ -301,7 +301,11 @@ static struct platform_driver ath79_gpio + .probe = ath79_gpio_probe, + }; + +-module_platform_driver(ath79_gpio_driver); ++static int __init ath79_gpio_init(void) ++{ ++ return platform_driver_register(&ath79_gpio_driver); ++} ++postcore_initcall(ath79_gpio_init); + + MODULE_DESCRIPTION("Atheros AR71XX/AR724X/AR913X GPIO API support"); + MODULE_LICENSE("GPL v2");