diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2011-12-12 19:45:56 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-12-30 17:38:06 +0100 |
commit | 5d4294b8ddf92092ffad61fe552adeeabb4242bd (patch) | |
tree | 670015258ae031f53b2422ef963337009a1ef7d1 /drivers/media/video/m5mols/m5mols.h | |
parent | [media] m5mols: Change the end of frame v4l2_subdev notification id (diff) | |
download | linux-5d4294b8ddf92092ffad61fe552adeeabb4242bd.tar.xz linux-5d4294b8ddf92092ffad61fe552adeeabb4242bd.zip |
[media] m5mols: Don't ignore v4l2_ctrl_handler_setup() return value
v4l2_ctrl_handler_setup() may fail so check its return value when
restoring controls after device is powered on. While at it simplify
the m5mols_restore_function() a bit.
Acked-by: HeungJun Kim <riverful.kim@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/m5mols/m5mols.h')
-rw-r--r-- | drivers/media/video/m5mols/m5mols.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/media/video/m5mols/m5mols.h b/drivers/media/video/m5mols/m5mols.h index 0265ea602280..4b021e1ee5f2 100644 --- a/drivers/media/video/m5mols/m5mols.h +++ b/drivers/media/video/m5mols/m5mols.h @@ -188,15 +188,16 @@ struct m5mols_info { struct media_pad pad; struct v4l2_mbus_framefmt ffmt[M5MOLS_RESTYPE_MAX]; int res_type; + wait_queue_head_t irq_waitq; atomic_t irq_done; struct v4l2_ctrl_handler handle; + /* Autoexposure/exposure control cluster */ - struct { - struct v4l2_ctrl *autoexposure; - struct v4l2_ctrl *exposure; - }; + struct v4l2_ctrl *autoexposure; + struct v4l2_ctrl *exposure; + struct v4l2_ctrl *autowb; struct v4l2_ctrl *colorfx; struct v4l2_ctrl *saturation; @@ -213,10 +214,10 @@ struct m5mols_info { bool lock_awb; u8 resolution; u8 mode; + int (*set_power)(struct device *dev, int on); }; -#define is_ctrl_synced(__info) (__info->ctrl_sync) #define is_available_af(__info) (__info->ver.af) #define is_code(__code, __type) (__code == m5mols_default_ffmt[__type].code) #define is_manufacturer(__info, __manufacturer) \ @@ -285,7 +286,7 @@ int m5mols_mode(struct m5mols_info *info, u8 mode); int m5mols_enable_interrupt(struct v4l2_subdev *sd, u8 reg); int m5mols_wait_interrupt(struct v4l2_subdev *sd, u8 condition, u32 timeout); -int m5mols_sync_controls(struct m5mols_info *info); +int m5mols_restore_controls(struct m5mols_info *info); int m5mols_start_capture(struct m5mols_info *info); int m5mols_do_scenemode(struct m5mols_info *info, u8 mode); int m5mols_lock_3a(struct m5mols_info *info, bool lock); |