提交 1f438d23 编写于 作者: V Vadim Pasternak 提交者: Wolfram Sang

i2c: mlxcpld: Add callback to notify probing completion

Add notification to inform caller that driver probing has been
completed. It allows to user, invoked platform device registration for
"i2c-mlxcpld" driver, to be notified that bus adapter is available, and
thus some devices could be connected to this bus.
Signed-off-by: NVadim Pasternak <vadimp@nvidia.com>
Signed-off-by: NWolfram Sang <wsa@kernel.org>
上级 9ae551de
...@@ -560,6 +560,10 @@ static int mlxcpld_i2c_probe(struct platform_device *pdev) ...@@ -560,6 +560,10 @@ static int mlxcpld_i2c_probe(struct platform_device *pdev)
if (err) if (err)
goto mlxcpld_i2_probe_failed; goto mlxcpld_i2_probe_failed;
/* Notify caller when adapter is added. */
if (pdata && pdata->completion_notify)
pdata->completion_notify(pdata->handle, mlxcpld_i2c_adapter.nr);
return 0; return 0;
mlxcpld_i2_probe_failed: mlxcpld_i2_probe_failed:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册