bool major_version_mismatch = false;
bool minor_version_mismatch = false;
- if (WARN_ON(!fsl_mc_bus_type.dev_root))
+ if (WARN_ON(!fsl_mc_bus_exists()))
goto out;
if (!mc_drv->match_id_table)
}
EXPORT_SYMBOL_GPL(fsl_mc_driver_unregister);
+/**
+ * fsl_mc_bus_exists - check if a root dprc exists
+ */
+bool fsl_mc_bus_exists(void)
+{
+ return fsl_mc_bus_type.dev_root;
+}
+EXPORT_SYMBOL_GPL(fsl_mc_bus_exists);
+
static int get_dprc_icid(struct fsl_mc_io *mc_io,
int container_id, u16 *icid)
{
mc_io2 = mc_io;
- if (!fsl_mc_bus_type.dev_root)
+ if (!fsl_mc_bus_exists())
fsl_mc_bus_type.dev_root = &mc_dev->dev;
}
void fsl_mc_driver_unregister(struct fsl_mc_driver *driver);
+bool fsl_mc_bus_exists(void);
+
int __must_check fsl_mc_portal_allocate(struct fsl_mc_device *mc_dev,
u16 mc_io_flags,
struct fsl_mc_io **new_mc_io);