aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIonut Nicu <ioan.nicu.ext@nsn.com>2013-10-09 05:50:45 -0400
committerWolfram Sang <wsa@the-dreams.de>2013-10-10 04:22:33 -0400
commit9937b8d89e1b70c08330b57afbc62c934e37c9e2 (patch)
tree7634cf32455503af0eb60c1ad26f86c916a6679b
parent492ed77bfadb968cca7beca348cd45b444393cd4 (diff)
i2c: i2c-mux-gpio: use deferred probing
If the i2c-parent bus driver is not loaded, returning -ENODEV will force people to unload and then reload the module again to get it working. Signed-off-by: Ionut Nicu <ioan.nicu.ext@nsn.com> Acked-by: Peter Korsgaard <peter.korsgaard@barco.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-rw-r--r--drivers/i2c/muxes/i2c-mux-gpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/muxes/i2c-mux-gpio.c b/drivers/i2c/muxes/i2c-mux-gpio.c
index 7f343bcd492e..a764da777f08 100644
--- a/drivers/i2c/muxes/i2c-mux-gpio.c
+++ b/drivers/i2c/muxes/i2c-mux-gpio.c
@@ -79,7 +79,7 @@ static int i2c_mux_gpio_probe_dt(struct gpiomux *mux,
79 adapter = of_find_i2c_adapter_by_node(adapter_np); 79 adapter = of_find_i2c_adapter_by_node(adapter_np);
80 if (!adapter) { 80 if (!adapter) {
81 dev_err(&pdev->dev, "Cannot find parent bus\n"); 81 dev_err(&pdev->dev, "Cannot find parent bus\n");
82 return -ENODEV; 82 return -EPROBE_DEFER;
83 } 83 }
84 mux->data.parent = i2c_adapter_id(adapter); 84 mux->data.parent = i2c_adapter_id(adapter);
85 put_device(&adapter->dev); 85 put_device(&adapter->dev);
@@ -181,7 +181,7 @@ static int i2c_mux_gpio_probe(struct platform_device *pdev)
181 if (!parent) { 181 if (!parent) {
182 dev_err(&pdev->dev, "Parent adapter (%d) not found\n", 182 dev_err(&pdev->dev, "Parent adapter (%d) not found\n",
183 mux->data.parent); 183 mux->data.parent);
184 return -ENODEV; 184 return -EPROBE_DEFER;
185 } 185 }
186 186
187 mux->parent = parent; 187 mux->parent = parent;