From: Ameya Palande <ameya.palande@xxxxxxxxx> This prevents a panic caused by an IOCTL call before driver completes its initialization. Signed-off-by: Ameya Palande <ameya.palande@xxxxxxxxx> --- drivers/dsp/bridge/rmgr/drv_interface.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/dsp/bridge/rmgr/drv_interface.c b/drivers/dsp/bridge/rmgr/drv_interface.c index 9466409..b562513 100755 --- a/drivers/dsp/bridge/rmgr/drv_interface.c +++ b/drivers/dsp/bridge/rmgr/drv_interface.c @@ -298,14 +298,6 @@ static int __devinit omap34xx_bridge_probe(struct platform_device *pdev) bridge_device->cdev.owner = THIS_MODULE; bridge_device->cdev.ops = &bridge_fops; - status = cdev_add(&bridge_device->cdev, dev, 1); - - if (status) { - GT_0trace(driverTrace, GT_7CLASS, - "Failed to add the bridge device \n"); - return status; - } - /* udev support */ bridge_class = class_create(THIS_MODULE, "ti_bridge"); @@ -429,6 +421,12 @@ static int __devinit omap34xx_bridge_probe(struct platform_device *pdev) } else { GT_0trace(driverTrace, GT_5CLASS, "DSP/BIOS Bridge driver loaded\n"); + /* Announce to kernel that we are ready */ + status = cdev_add(&bridge_device->cdev, dev, 1); + if (status) { + GT_0trace(driverTrace, GT_7CLASS, + "Failed to add the bridge device \n"); + } } } -- 1.6.2.4 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html