return -ENODEV;
 
        /* Enable the chip */
-       data = reg_write(&mt9m001->icd, MT9M001_CHIP_ENABLE, 1);
+       data = reg_write(icd, MT9M001_CHIP_ENABLE, 1);
        dev_dbg(&icd->dev, "write: %d\n", data);
 
        /* Read out the chip version register */
        struct mt9m001 *mt9m001 = container_of(icd, struct mt9m001, icd);
 
        dev_dbg(&icd->dev, "Video %x removed: %p, %p\n", mt9m001->client->addr,
-               mt9m001->icd.dev.parent, mt9m001->icd.vdev);
-       soc_camera_video_stop(&mt9m001->icd);
+               icd->dev.parent, icd->vdev);
+       soc_camera_video_stop(icd);
 }
 
 static int mt9m001_probe(struct i2c_client *client,
 
        struct mt9v022 *mt9v022 = container_of(icd, struct mt9v022, icd);
 
        dev_dbg(&icd->dev, "Video %x removed: %p, %p\n", mt9v022->client->addr,
-               mt9v022->icd.dev.parent, mt9v022->icd.vdev);
-       soc_camera_video_stop(&mt9v022->icd);
+               icd->dev.parent, icd->vdev);
+       soc_camera_video_stop(icd);
 }
 
 static int mt9v022_probe(struct i2c_client *client,