diff mbox

soc_camera_platform: add set_fmt callback

Message ID 266c646d111590fda11bd3bbecfe49dea6789e4e.1277097465.git.baruch@tkos.co.il (mailing list archive)
State Rejected
Headers show

Commit Message

Baruch Siach June 21, 2010, 5:19 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/soc_camera_platform.c b/drivers/media/video/soc_camera_platform.c
index 248c986..208fd42 100644
--- a/drivers/media/video/soc_camera_platform.c
+++ b/drivers/media/video/soc_camera_platform.c
@@ -61,6 +61,9 @@  static int soc_camera_platform_try_fmt(struct v4l2_subdev *sd,
 {
 	struct soc_camera_platform_info *p = v4l2_get_subdevdata(sd);
 
+	if (p->try_fmt)
+		return p->try_fmt(p, mf);
+
 	mf->width	= p->format.width;
 	mf->height	= p->format.height;
 	mf->code	= p->format.code;
diff --git a/include/media/soc_camera_platform.h b/include/media/soc_camera_platform.h
index 0ecefe2..0558ffc 100644
--- a/include/media/soc_camera_platform.h
+++ b/include/media/soc_camera_platform.h
@@ -22,6 +22,8 @@  struct soc_camera_platform_info {
 	struct v4l2_mbus_framefmt format;
 	unsigned long bus_param;
 	struct device *dev;
+	int (*try_fmt)(struct soc_camera_platform_info *info,
+			struct v4l2_mbus_framefmt *mf);
 	int (*set_capture)(struct soc_camera_platform_info *info, int enable);
 };