staging: vc04_services: rename variables containing bm2835_* to bcm2835_*

In the kernel, all names related to the chip BCM2835 are always named
bcm2835_*. To avoid confusion, and to make things more consistent,
rename all variables using bm2835_* to bcm2835_*.

While at it, some realignments were made to improve readability.

Suggested-by: Stefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: Gaston Gonzalez <gascoar@gmail.com>
Link: https://lore.kernel.org/r/a0af5deacebc2da9b21772c7677e1a9627edbed6.1641414449.git.gascoar@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Gaston Gonzalez 2022-01-05 17:35:45 -03:00 committed by Greg Kroah-Hartman
parent d677642466
commit eccbcf75a7
2 changed files with 14 additions and 21 deletions

View File

@ -654,7 +654,7 @@ static void stop_streaming(struct vb2_queue *vq)
v4l2_err(&dev->v4l2_dev, "Failed to disable camera\n");
}
static const struct vb2_ops bm2835_mmal_video_qops = {
static const struct vb2_ops bcm2835_mmal_video_qops = {
.queue_setup = queue_setup,
.buf_init = buffer_init,
.buf_prepare = buffer_prepare,
@ -1930,7 +1930,7 @@ static int bcm2835_mmal_probe(struct platform_device *pdev)
q->io_modes = VB2_MMAP | VB2_USERPTR | VB2_READ;
q->drv_priv = dev;
q->buf_struct_size = sizeof(struct vb2_mmal_buffer);
q->ops = &bm2835_mmal_video_qops;
q->ops = &bcm2835_mmal_video_qops;
q->mem_ops = &vb2_vmalloc_memops;
q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
q->lock = &dev->mutex;

View File

@ -58,7 +58,7 @@ static const u32 iso_values[] = {
0, 100, 200, 400, 800,
};
enum bm2835_mmal_ctrl_type {
enum bcm2835_mmal_ctrl_type {
MMAL_CONTROL_TYPE_STD,
MMAL_CONTROL_TYPE_STD_MENU,
MMAL_CONTROL_TYPE_INT_MENU,
@ -67,7 +67,7 @@ enum bm2835_mmal_ctrl_type {
struct bcm2835_mmal_v4l2_ctrl {
u32 id; /* v4l2 control identifier */
enum bm2835_mmal_ctrl_type type;
enum bcm2835_mmal_ctrl_type type;
/* control minimum value or
* mask for MMAL_CONTROL_TYPE_STD_MENU
*/
@ -903,7 +903,7 @@ static int bcm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl)
return ret;
}
static const struct v4l2_ctrl_ops bm2835_mmal_ctrl_ops = {
static const struct v4l2_ctrl_ops bcm2835_mmal_ctrl_ops = {
.s_ctrl = bcm2835_mmal_s_ctrl,
};
@ -1323,12 +1323,9 @@ int bcm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, struct v4l2_ctrl_ha
switch (ctrl->type) {
case MMAL_CONTROL_TYPE_STD:
dev->ctrls[c] =
v4l2_ctrl_new_std(hdl,
&bm2835_mmal_ctrl_ops,
ctrl->id, ctrl->min,
ctrl->max, ctrl->step,
ctrl->def);
dev->ctrls[c] = v4l2_ctrl_new_std(hdl, &bcm2835_mmal_ctrl_ops,
ctrl->id, ctrl->min, ctrl->max,
ctrl->step, ctrl->def);
break;
case MMAL_CONTROL_TYPE_STD_MENU:
@ -1352,20 +1349,16 @@ int bcm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, struct v4l2_ctrl_ha
mask = ~mask;
}
dev->ctrls[c] =
v4l2_ctrl_new_std_menu(hdl,
&bm2835_mmal_ctrl_ops,
ctrl->id, ctrl->max,
mask, ctrl->def);
dev->ctrls[c] = v4l2_ctrl_new_std_menu(hdl, &bcm2835_mmal_ctrl_ops,
ctrl->id, ctrl->max, mask,
ctrl->def);
break;
}
case MMAL_CONTROL_TYPE_INT_MENU:
dev->ctrls[c] =
v4l2_ctrl_new_int_menu(hdl,
&bm2835_mmal_ctrl_ops,
ctrl->id, ctrl->max,
ctrl->def, ctrl->imenu);
dev->ctrls[c] = v4l2_ctrl_new_int_menu(hdl, &bcm2835_mmal_ctrl_ops,
ctrl->id, ctrl->max,
ctrl->def, ctrl->imenu);
break;
case MMAL_CONTROL_TYPE_CLUSTER: