usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present
Subsystems (3)
PATCH 1/1 usb: typec: intel_pmc_mux: Defer probe if SCU IPC isn't present
If pmc_usb_probe is called before SCU IPC is registered, pmc_usb_probe will fail.
Return -EPROBE_DEFER when pmc_usb_probe doesn't get SCU IPC device, so the probe function can be called again after SCU IPC is initialized.
Signed-off-by Tomasz Michalec <[email protected]>
--- drivers/usb/typec/mux/intel_pmc_mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/typec/mux/intel_pmc_mux.c +1 -1
@@ -754,7 +754,7 @@ static int pmc_usb_probe(struct platform_device *pdev) pmc->ipc =devm_intel_scu_ipc_dev_get (&pdev->dev);if (!pmc->ipc) -return -ENODEV ; +return -EPROBE_DEFER ; pmc->dev = &pdev->dev;
Signature · 1 line
2.50.0.rc0.604.gd4ff7b7c86-goog
Quoted 7 lines · Tomasz Michalec
If
pmc_usb_probeis called before SCU IPC is registered,pmc_usb_probewill fail.Return -EPROBE_DEFER when
pmc_usb_probedoesn't get SCU IPC device, so the probe function can be called again after SCU IPC is initialized.Signed-off-by Tomasz Michalec <[email protected]>
Reviewed-by Heikki Krogerus <[email protected]>
Quoted 19 lines
--- drivers/usb/typec/mux/intel_pmc_mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/typec/mux/intel_pmc_mux.c +1
-1@@ -754,7 +754,7 @@ static int pmc_usb_probe(struct platform_device *pdev) pmc->ipc =devm_intel_scu_ipc_dev_get (&pdev->dev);if (!pmc->ipc) -return -ENODEV ; +return -EPROBE_DEFER ; pmc->dev = &pdev->dev;Signature · 1 line
2.50.0.rc0.604.gd4ff7b7c86-goog
Signature · 1 line
heikki