Commit b22b9f32 authored by Guennadi Liakhovetski's avatar Guennadi Liakhovetski Committed by Mauro Carvalho Chehab

[media] mt9m032: use the available subdev pointer, don't re-calculate it

Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 5bfa474b
...@@ -838,9 +838,9 @@ static int mt9m032_remove(struct i2c_client *client) ...@@ -838,9 +838,9 @@ static int mt9m032_remove(struct i2c_client *client)
struct v4l2_subdev *subdev = i2c_get_clientdata(client); struct v4l2_subdev *subdev = i2c_get_clientdata(client);
struct mt9m032 *sensor = to_mt9m032(subdev); struct mt9m032 *sensor = to_mt9m032(subdev);
v4l2_device_unregister_subdev(&sensor->subdev); v4l2_device_unregister_subdev(subdev);
v4l2_ctrl_handler_free(&sensor->ctrls); v4l2_ctrl_handler_free(&sensor->ctrls);
media_entity_cleanup(&sensor->subdev.entity); media_entity_cleanup(&subdev->entity);
mutex_destroy(&sensor->lock); mutex_destroy(&sensor->lock);
kfree(sensor); kfree(sensor);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment