goto error_media;
}
- /* V4L2 Control Handler */
-
- ret = v4l2_ctrl_handler_init(&v4l2->ctrl_handler, 0);
- if (ret) {
- dev_err(dev, "failed to init v4l2 control handler: %d\n", ret);
- goto error_media;
- }
-
/* V4L2 Device */
v4l2_dev->mdev = media_dev;
- v4l2_dev->ctrl_handler = &v4l2->ctrl_handler;
ret = v4l2_device_register(dev, v4l2_dev);
if (ret) {
dev_err(dev, "failed to register v4l2 device: %d\n", ret);
- goto error_v4l2_ctrl;
+ goto error_media;
}
/* Video */
error_v4l2_device:
v4l2_device_unregister(&v4l2->v4l2_dev);
-error_v4l2_ctrl:
- v4l2_ctrl_handler_free(&v4l2->ctrl_handler);
-
error_media:
media_device_unregister(media_dev);
media_device_cleanup(media_dev);
v4l2_async_nf_cleanup(&v4l2->notifier);
sun6i_video_cleanup(csi_dev);
v4l2_device_unregister(&v4l2->v4l2_dev);
- v4l2_ctrl_handler_free(&v4l2->ctrl_handler);
media_device_cleanup(&v4l2->media_dev);
}
#ifndef __SUN6I_CSI_H__
#define __SUN6I_CSI_H__
-#include <media/v4l2-ctrls.h>
#include <media/v4l2-device.h>
#include <media/v4l2-fwnode.h>
struct sun6i_csi_v4l2 {
struct v4l2_device v4l2_dev;
- struct v4l2_ctrl_handler ctrl_handler;
struct media_device media_dev;
struct v4l2_async_notifier notifier;
.vidioc_dqbuf = vb2_ioctl_dqbuf,
.vidioc_streamon = vb2_ioctl_streamon,
.vidioc_streamoff = vb2_ioctl_streamoff,
-
- .vidioc_log_status = v4l2_ctrl_log_status,
- .vidioc_subscribe_event = v4l2_ctrl_subscribe_event,
- .vidioc_unsubscribe_event = v4l2_event_unsubscribe,
};
/* V4L2 File */