Revert "staging: mt7621-pinctrl: replace core_initcall_sync with builtin_platform_driver"
authorSergio Paracuellos <sergio.paracuellos@gmail.com>
Mon, 9 Jul 2018 11:28:30 +0000 (13:28 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Jul 2018 10:36:28 +0000 (12:36 +0200)
That patch causes the network interface on the device to stop working.
device_initcall() is called much later than core_initcall_sync() and
that seem to be a problem. Revert it to get a correct behaviour.

Reported-by: NeilBrown <neil@brown.name>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/mt7621-pinctrl/pinctrl-rt2880.c

index c223ecb..b8566ed 100644 (file)
@@ -423,4 +423,9 @@ static struct platform_driver rt2880_pinmux_driver = {
        },
 };
 
-builtin_platform_driver(rt2880_pinmux_driver);
+int __init rt2880_pinmux_init(void)
+{
+       return platform_driver_register(&rt2880_pinmux_driver);
+}
+
+core_initcall_sync(rt2880_pinmux_init);