[media] mt9m032: use the available subdev pointer, don't re-calculate it
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Wed, 18 Apr 2012 08:00:52 +0000 (05:00 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 14 May 2012 16:38:34 +0000 (13:38 -0300)
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/mt9m032.c

index 645973c5feb01d7a9413310a106a35af59dd4c0d..3c1e626139b79e06353062e9e65c7e279e3d95a7 100644 (file)
@@ -838,9 +838,9 @@ static int mt9m032_remove(struct i2c_client *client)
        struct v4l2_subdev *subdev = i2c_get_clientdata(client);
        struct mt9m032 *sensor = to_mt9m032(subdev);
 
-       v4l2_device_unregister_subdev(&sensor->subdev);
+       v4l2_device_unregister_subdev(subdev);
        v4l2_ctrl_handler_free(&sensor->ctrls);
-       media_entity_cleanup(&sensor->subdev.entity);
+       media_entity_cleanup(&subdev->entity);
        mutex_destroy(&sensor->lock);
        kfree(sensor);
        return 0;