From 04664e5c834692e39f72a13121465211fa64e88c Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Tue, 25 Sep 2018 01:55:28 +0200 Subject: [PATCH] drivers/bus: fill driver reference after NXP probing The probing functions of NXP buses were missing to set the driver used for successfully probing a device. The NXP driver and the generic rte_driver are now set in the device structures. Signed-off-by: Thomas Monjalon Acked-by: Shreyansh Jain --- drivers/bus/dpaa/dpaa_bus.c | 6 +++++- drivers/bus/fslmc/fslmc_bus.c | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/bus/dpaa/dpaa_bus.c b/drivers/bus/dpaa/dpaa_bus.c index 16fabd1be1..49cd04dbb4 100644 --- a/drivers/bus/dpaa/dpaa_bus.c +++ b/drivers/bus/dpaa/dpaa_bus.c @@ -563,8 +563,12 @@ rte_dpaa_bus_probe(void) dev->device.devargs->policy == RTE_DEV_WHITELISTED)) { ret = drv->probe(drv, dev); - if (ret) + if (ret) { DPAA_BUS_ERR("Unable to probe.\n"); + } else { + dev->driver = drv; + dev->device.driver = &drv->driver; + } } break; } diff --git a/drivers/bus/fslmc/fslmc_bus.c b/drivers/bus/fslmc/fslmc_bus.c index d2900edc51..bfe81e2369 100644 --- a/drivers/bus/fslmc/fslmc_bus.c +++ b/drivers/bus/fslmc/fslmc_bus.c @@ -396,8 +396,12 @@ rte_fslmc_probe(void) dev->device.devargs->policy == RTE_DEV_WHITELISTED)) { ret = drv->probe(drv, dev); - if (ret) + if (ret) { DPAA2_BUS_ERR("Unable to probe"); + } else { + dev->driver = drv; + dev->device.driver = &drv->driver; + } } break; } -- 2.20.1