struct v4l2_subdev *subdev;
        int failure = 0;
        int ret;
+       u32 id;
 
        /*
         * We need to stop all the modules after CCDC first or they'll
                if (ret) {
                        dev_info(isp->dev, "Unable to stop %s\n", subdev->name);
                        isp->stop_failure = true;
-                       if (subdev == &isp->isp_prev.subdev)
-                               isp->crashed |= 1U << subdev->entity.id;
+                       if (subdev == &isp->isp_prev.subdev) {
+                               id = media_entity_id(&subdev->entity);
+                               isp->crashed |= 1U << id;
+                       }
                        failure = -ETIMEDOUT;
                }
        }
 
        /* Wait for the CCDC to become idle. */
        if (ccdc_sbl_wait_idle(ccdc, 1000)) {
                dev_info(isp->dev, "CCDC won't become idle!\n");
-               isp->crashed |= 1U << ccdc->subdev.entity.id;
+               isp->crashed |= 1U << media_entity_id(&ccdc->subdev.entity);
                omap3isp_pipeline_cancel_stream(pipe);
                return 0;
        }
 
        while ((entity = media_entity_graph_walk_next(&graph))) {
                struct isp_video *__video;
 
-               pipe->entities |= 1 << entity->id;
+               pipe->entities |= 1 << media_entity_id(entity);
 
                if (far_end != NULL)
                        continue;
        struct v4l2_ext_control ctrl;
        unsigned int i;
        int ret;
+       u32 id;
 
        /* Memory-to-memory pipelines have no external subdev. */
        if (pipe->input != NULL)
 
        for (i = 0; i < ARRAY_SIZE(ents); i++) {
                /* Is the entity part of the pipeline? */
-               if (!(pipe->entities & (1 << ents[i]->id)))
+               if (!(pipe->entities & (1 << media_entity_id(ents[i]))))
                        continue;
 
                /* ISP entities have always sink pad == 0. Find source. */
 
        pipe->external_rate = ctrl.value64;
 
-       if (pipe->entities & (1 << isp->isp_ccdc.subdev.entity.id)) {
+       id = media_entity_id(&isp->isp_ccdc.subdev.entity);
+       if (pipe->entities & (1 << id)) {
                unsigned int rate = UINT_MAX;
                /*
                 * Check that maximum allowed CCDC pixel rate isn't