[PATCH v5 04/15] platform/x86: i2c-multi-instantiate: Defer probe when no adapter found

2018-11-28 Thread Andy Shevchenko
Likewise the rest of the i2c_acpi_new_device() users, defer the probe
of the i2c-multi-intantiate driver in case adapter is not yet found.

Signed-off-by: Andy Shevchenko 
Reviewed-by: Hans de Goede 
---
 drivers/platform/x86/i2c-multi-instantiate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/i2c-multi-instantiate.c 
b/drivers/platform/x86/i2c-multi-instantiate.c
index e3345da82c84..16a0eabe1e31 100644
--- a/drivers/platform/x86/i2c-multi-instantiate.c
+++ b/drivers/platform/x86/i2c-multi-instantiate.c
@@ -75,7 +75,7 @@ static int i2c_multi_inst_probe(struct platform_device *pdev)
if (IS_ERR(multi->clients[i]))
ret = PTR_ERR(multi->clients[i]);
else if (!multi->clients[i])
-   ret = -ENODEV;
+   ret = -EPROBE_DEFER; /* Wait for i2c-adapter to load */
else
ret = 0;
if (ret) {
-- 
2.19.2



[PATCH v5 04/15] platform/x86: i2c-multi-instantiate: Defer probe when no adapter found

2018-11-28 Thread Andy Shevchenko
Likewise the rest of the i2c_acpi_new_device() users, defer the probe
of the i2c-multi-intantiate driver in case adapter is not yet found.

Signed-off-by: Andy Shevchenko 
Reviewed-by: Hans de Goede 
---
 drivers/platform/x86/i2c-multi-instantiate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/i2c-multi-instantiate.c 
b/drivers/platform/x86/i2c-multi-instantiate.c
index e3345da82c84..16a0eabe1e31 100644
--- a/drivers/platform/x86/i2c-multi-instantiate.c
+++ b/drivers/platform/x86/i2c-multi-instantiate.c
@@ -75,7 +75,7 @@ static int i2c_multi_inst_probe(struct platform_device *pdev)
if (IS_ERR(multi->clients[i]))
ret = PTR_ERR(multi->clients[i]);
else if (!multi->clients[i])
-   ret = -ENODEV;
+   ret = -EPROBE_DEFER; /* Wait for i2c-adapter to load */
else
ret = 0;
if (ret) {
-- 
2.19.2