Skip to contentSkip to conversation

pinctrl: iproc: Fix iProc and NSP GPIO support

PATCH In review Ray Jui 2 participants 2 messages Oct 18, 2016 – Oct 21, 2016

Subsystems (3)
lore
Share & tools
lore

Ray Jui

author
#0 lore raw

PATCH 1/1 pinctrl: iproc: Fix iProc and NSP GPIO support

Since commit 44a7185c2ae6 ("of/platform: Add common method to populate default bus"), ARM64 platform devices are populated at the arch_initcall_sync level; as a result, the platform_driver_probe calls in both the iProc and NSP GPIO drivers fail with -ENODEV since by that time the platform device was not yet registered.

Replace platform_driver_probe with platform_driver_register, that allow the device to be register later

---
 drivers/pinctrl/bcm/pinctrl-iproc-gpio.c | 2 +-
 drivers/pinctrl/bcm/pinctrl-nsp-gpio.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/pinctrl/bcm/pinctrl-iproc-gpio.c +1 -1
index 7f77007..5d1e505c3 100644
@@ -844,6 +844,6 @@ static struct platform_driver iproc_gpio_driver = {
 
 static int __init iproc_gpio_init(void)
 {
-	return platform_driver_probe(&iproc_gpio_driver, iproc_gpio_probe);
+	return platform_driver_register(&iproc_gpio_driver);
 }
 arch_initcall_sync(iproc_gpio_init);
drivers/pinctrl/bcm/pinctrl-nsp-gpio.c +1 -1
index 35783db..c8deb8b 100644
@@ -741,6 +741,6 @@ static struct platform_driver nsp_gpio_driver = {
 
 static int __init nsp_gpio_init(void)
 {
-	return platform_driver_probe(&nsp_gpio_driver, nsp_gpio_probe);
+	return platform_driver_register(&nsp_gpio_driver);
 }
 arch_initcall_sync(nsp_gpio_init);
Signature · 1 line
2.1.4
#1 lore raw
Quoted 10 lines · Ray Jui

Since commit 44a7185c2ae6 ("of/platform: Add common method to populate default bus"), ARM64 platform devices are populated at the arch_initcall_sync level; as a result, the platform_driver_probe calls in both the iProc and NSP GPIO drivers fail with -ENODEV since by that time the platform device was not yet registered.

Replace platform_driver_probe with platform_driver_register, that allow the device to be register later

Patch applied for fixes.

Yours,
Linus Walleij