From: Eduardo Valentin <eduardo.valentin@xxxxxxxxxxx> camera_device_unregister expected the argument to be its own device structure but it's actually that of its slave. Also get master from slave's structure in camera_device_register. Signed-off-by: Eduardo Valentin <eduardo.valentin@xxxxxxxxxxx> --- drivers/media/video/omap/camera_core.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/media/video/omap/camera_core.c b/drivers/media/video/omap/camera_core.c index 6e5d8bd..be033be 100644 --- a/drivers/media/video/omap/camera_core.c +++ b/drivers/media/video/omap/camera_core.c @@ -1007,17 +1007,16 @@ static ssize_t camera_streaming_show(struct device *dev, static DEVICE_ATTR(streaming, S_IRUGO, camera_streaming_show, NULL); -static void camera_device_unregister(struct v4l2_int_device *ctl) +static void camera_device_unregister(struct v4l2_int_device *s) { - struct camera_device *cam = ctl->priv; + struct camera_device *cam = s->u.slave->master->priv; camera_sensor_exit(cam); } -static int camera_device_register(struct v4l2_int_device *ctl, - struct v4l2_int_device *s) +static int camera_device_register(struct v4l2_int_device *s) { - struct camera_device *cam = ctl->priv; + struct camera_device *cam = s->u.slave->master->priv; struct video_device *vfd; int rval; @@ -1092,7 +1091,7 @@ static int camera_device_register(struct v4l2_int_device *ctl, return 0; err: - camera_device_unregister(ctl); + camera_device_unregister(s); return rval; } -- 1.5.3.4.206.g58ba4 - 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