drivers/bus: fill driver reference after NXP probing
authorThomas Monjalon <thomas@monjalon.net>
Mon, 24 Sep 2018 23:55:28 +0000 (01:55 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 27 Sep 2018 12:43:47 +0000 (14:43 +0200)
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 <thomas@monjalon.net>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
drivers/bus/dpaa/dpaa_bus.c
drivers/bus/fslmc/fslmc_bus.c

index 16fabd1..49cd04d 100644 (file)
@@ -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;
                }
index d2900ed..bfe81e2 100644 (file)
@@ -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;
                }