[RFC,1/3,media] gspca - main: rename get_ctrl to get_ctrl_index

Message ID 1334935152-16165-2-git-send-email-ospite@studenti.unina.it (mailing list archive)
State RFC, archived
Headers

Commit Message

Antonio Ospite April 20, 2012, 3:19 p.m. UTC
  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 <ospite@studenti.unina.it>
---
 drivers/media/video/gspca/gspca.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
  

Patch

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];