summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/slimbus/core.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index 7cd635eb44ed..1888fafc0e73 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -43,8 +43,23 @@ static int slim_device_probe(struct device *dev)
{
struct slim_device *sbdev = to_slim_device(dev);
struct slim_driver *sbdrv = to_slim_driver(dev->driver);
+ int ret;
+
+ ret = sbdrv->probe(sbdev);
+ if (ret)
+ return ret;
+
+ /* try getting the logical address after probe */
+ ret = slim_get_logical_addr(sbdev);
+ if (!ret) {
+ if (sbdrv->device_status)
+ sbdrv->device_status(sbdev, sbdev->status);
+ } else {
+ dev_err(&sbdev->dev, "Failed to get logical address\n");
+ ret = -EPROBE_DEFER;
+ }
- return sbdrv->probe(sbdev);
+ return ret;
}
static int slim_device_remove(struct device *dev)