summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorClark Wang <xiaoning.wang@nxp.com>2019-08-20 20:45:12 +0800
committerDong Aisheng <aisheng.dong@nxp.com>2019-11-25 15:46:16 +0800
commit815085e823878c9c317e38122693c13df8db0b29 (patch)
treeb1f5ce02efafb9ea73792ea47bc5130344842ad4 /drivers
parentf2b88505267345c51c6e1db41bd4b78f80d4e7bb (diff)
i2c: rpmsg-imx: add defer probe for rpbus
Add defer probe when rpbus probe, so if the rpmsg channel is not created, the rpbus will try to probe later. Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/i2c/busses/i2c-rpmsg-imx.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/i2c/busses/i2c-rpmsg-imx.c b/drivers/i2c/busses/i2c-rpmsg-imx.c
index 9d0561f8cb19..06e705271172 100644
--- a/drivers/i2c/busses/i2c-rpmsg-imx.c
+++ b/drivers/i2c/busses/i2c-rpmsg-imx.c
@@ -379,6 +379,9 @@ static int i2c_rpbus_probe(struct platform_device *pdev)
struct i2c_adapter *adapter;
int ret;
+ if (!i2c_rpmsg.rpdev)
+ return -EPROBE_DEFER;
+
rdata = devm_kzalloc(&pdev->dev, sizeof(*rdata), GFP_KERNEL);
if (!rdata)
return -ENOMEM;