From patchwork Fri Apr 20 15:19:09 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Antonio Ospite X-Patchwork-Id: 10783 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1SLFce-000860-6f for patchwork@linuxtv.org; Fri, 20 Apr 2012 17:19:44 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp for id 1SLFcd-0006hL-BR; Fri, 20 Apr 2012 17:19:44 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932546Ab2DTPTk (ORCPT ); Fri, 20 Apr 2012 11:19:40 -0400 Received: from smtp209.alice.it ([82.57.200.105]:40422 "EHLO smtp209.alice.it" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932197Ab2DTPTj (ORCPT ); Fri, 20 Apr 2012 11:19:39 -0400 Received: from jcn (82.61.46.157) by smtp209.alice.it (8.6.023.02) id 4EF08A630D796929; Fri, 20 Apr 2012 17:19:37 +0200 Received: from ao2 by jcn with local (Exim 4.77) (envelope-from ) id 1SLFcV-0004DM-A1; Fri, 20 Apr 2012 17:19:35 +0200 From: Antonio Ospite To: linux-media@vger.kernel.org Cc: Antonio Ospite , Jean-Francois Moine , =?UTF-8?q?Erik=20Andr=C3=A9n?= Subject: [RFC PATCH 1/3] [media] gspca - main: rename get_ctrl to get_ctrl_index Date: Fri, 20 Apr 2012 17:19:09 +0200 Message-Id: <1334935152-16165-2-git-send-email-ospite@studenti.unina.it> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1334935152-16165-1-git-send-email-ospite@studenti.unina.it> References: <20120418153720.1359c7d2f2a3efc2c7c17b88@studenti.unina.it> <1334935152-16165-1-git-send-email-ospite@studenti.unina.it> X-Face: z*RaLf`X<@C75u6Ig9}{oW$H; 1_\2t5)({*|jhM/Vb; ]yA5\I~93>J<_`<4)A{':UrE Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.4.20.150616 X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1600_1699 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' This reflects better what the function does and is also in preparation of a refactoring of setting and getting controls. Signed-off-by: Antonio Ospite --- drivers/media/video/gspca/gspca.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index ca5a2b1..bc9d037 100644 --- a/drivers/media/video/gspca/gspca.c +++ b/drivers/media/video/gspca/gspca.c @@ -1415,7 +1415,7 @@ out: return ret; } -static int get_ctrl(struct gspca_dev *gspca_dev, +static int get_ctrl_index(struct gspca_dev *gspca_dev, int id) { const struct ctrl *ctrls; @@ -1458,7 +1458,7 @@ static int vidioc_queryctrl(struct file *file, void *priv, idx = i; } } else { - idx = get_ctrl(gspca_dev, id); + idx = get_ctrl_index(gspca_dev, id); } if (idx < 0) return -EINVAL; @@ -1483,7 +1483,7 @@ static int vidioc_s_ctrl(struct file *file, void *priv, struct gspca_ctrl *gspca_ctrl; int idx, ret; - idx = get_ctrl(gspca_dev, ctrl->id); + idx = get_ctrl_index(gspca_dev, ctrl->id); if (idx < 0) return -EINVAL; if (gspca_dev->ctrl_inac & (1 << idx)) @@ -1531,7 +1531,7 @@ static int vidioc_g_ctrl(struct file *file, void *priv, const struct ctrl *ctrls; int idx, ret; - idx = get_ctrl(gspca_dev, ctrl->id); + idx = get_ctrl_index(gspca_dev, ctrl->id); if (idx < 0) return -EINVAL; ctrls = &gspca_dev->sd_desc->ctrls[idx];