diff options
author | Hans de Goede | 2012-05-09 16:19:00 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab | 2012-05-14 14:42:34 +0200 |
commit | a8a478601ac1d8877e23cb832fe4b44042ce6f20 (patch) | |
tree | c2a0074e12c85ba852f340bbf83ec5fbd0ec348c /drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c | |
parent | [media] gspca_mars: Convert to the control framework (diff) | |
download | kernel-qcow2-linux-a8a478601ac1d8877e23cb832fe4b44042ce6f20.tar.gz kernel-qcow2-linux-a8a478601ac1d8877e23cb832fe4b44042ce6f20.tar.xz kernel-qcow2-linux-a8a478601ac1d8877e23cb832fe4b44042ce6f20.zip |
[media] gscpa: Move ctrl_handler to gspca_dev
We intend to eventually port all sub-drivers to the control-framework. At
which point it will make more sense to have the ctrl_handler in gspca_dev
then to have it in the subdrivers. Lets move it there now, to avoid a lot
of work to move it later.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c')
-rw-r--r-- | drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c index 74cbd386600b..06fa54c5efb2 100644 --- a/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c +++ b/drivers/media/video/gspca/stv06xx/stv06xx_hdcs.c @@ -335,15 +335,16 @@ static int hdcs_set_size(struct sd *sd, static int hdcs_s_ctrl(struct v4l2_ctrl *ctrl) { - struct sd *sd = container_of(ctrl->handler, struct sd, ctrl_handler); + struct gspca_dev *gspca_dev = + container_of(ctrl->handler, struct gspca_dev, ctrl_handler); int err = -EINVAL; switch (ctrl->id) { case V4L2_CID_GAIN: - err = hdcs_set_gain(&sd->gspca_dev, ctrl->val); + err = hdcs_set_gain(gspca_dev, ctrl->val); break; case V4L2_CID_EXPOSURE: - err = hdcs_set_exposure(&sd->gspca_dev, ctrl->val); + err = hdcs_set_exposure(gspca_dev, ctrl->val); break; } return err; @@ -355,7 +356,7 @@ static const struct v4l2_ctrl_ops hdcs_ctrl_ops = { static int hdcs_init_controls(struct sd *sd) { - struct v4l2_ctrl_handler *hdl = &sd->ctrl_handler; + struct v4l2_ctrl_handler *hdl = &sd->gspca_dev.ctrl_handler; v4l2_ctrl_handler_init(hdl, 2); v4l2_ctrl_new_std(hdl, &hdcs_ctrl_ops, |