From: Thomas Monjalon Date: Mon, 24 Sep 2018 23:55:28 +0000 (+0200) Subject: drivers/bus: fill driver reference after NXP probing X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=04664e5c834692e39f72a13121465211fa64e88c;p=dpdk.git 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 --- 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; }