diff options
author | Sylwester Nawrocki <s.nawrocki@samsung.com> | 2012-04-09 13:52:06 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-05-14 14:32:36 -0300 |
commit | 0373e97496793fd91cd7fb1a26840ee43d70f77e (patch) | |
tree | 09038399e27e1d5cd20f148ef045d1bcb4a54944 /drivers/media/video/m5mols/m5mols.h | |
parent | 3c5da0baaada8e8c7176a3e310dfdb4362f74d80 (diff) | |
download | lwn-0373e97496793fd91cd7fb1a26840ee43d70f77e.tar.gz lwn-0373e97496793fd91cd7fb1a26840ee43d70f77e.zip |
[media] m5mols: Use proper sensor mode for the controls
The parameters corresponding to the V4L controls can be reconfigured
only in associated M-5MOLS operation mode. Use struct v4l2_ctrl
priv field to assign the working mode to the controls which can be
modified only in certain conditions.
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 | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/media/video/m5mols/m5mols.h b/drivers/media/video/m5mols/m5mols.h index ed75bbeddc15..87684c47d372 100644 --- a/drivers/media/video/m5mols/m5mols.h +++ b/drivers/media/video/m5mols/m5mols.h @@ -305,4 +305,15 @@ static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) return &info->sd; } +static inline void m5mols_set_ctrl_mode(struct v4l2_ctrl *ctrl, + unsigned int mode) +{ + ctrl->priv = (void *)mode; +} + +static inline unsigned int m5mols_get_ctrl_mode(struct v4l2_ctrl *ctrl) +{ + return (unsigned int)ctrl->priv; +} + #endif /* M5MOLS_H */ |