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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxx>
---
 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];
-- 
1.7.10

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux