static int lm3556_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) { const struct lm3556_ctrl_id *s_ctrl; if (!ctrl) return -EINVAL; s_ctrl = find_ctrl_id(ctrl->id); if (s_ctrl == NULL) return -EINVAL; return s_ctrl->g_ctrl(sd, &ctrl->value); }
static int lm3554_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) { const struct lm3554_ctrl_id *s_ctrl; if (!ctrl) return -EINVAL; s_ctrl = find_ctrl_id(ctrl->id); if (!s_ctrl) return -EINVAL; return s_ctrl->s_ctrl(sd, ctrl->value); }