diff options
author | Gaston Gonzalez <gascoar@gmail.com> | 2022-01-05 17:35:45 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-01-06 14:49:22 +0100 |
commit | eccbcf75a75b6b0327ae7aa6d2cf96a3b99eda84 (patch) | |
tree | 832726875bc0400c91dd050d92f130380a3a6db6 /drivers/staging | |
parent | d6776424667cbbfe15d2482a220b620d3257a9bb (diff) | |
download | linux-stable-eccbcf75a75b6b0327ae7aa6d2cf96a3b99eda84.tar.gz linux-stable-eccbcf75a75b6b0327ae7aa6d2cf96a3b99eda84.tar.bz2 linux-stable-eccbcf75a75b6b0327ae7aa6d2cf96a3b99eda84.zip |
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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 4 | ||||
-rw-r--r-- | drivers/staging/vc04_services/bcm2835-camera/controls.c | 31 |
2 files changed, 14 insertions, 21 deletions
diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index 159ac600d11e..cbc881e19f65 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -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; diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c index 08fadc164b02..178fb310b89a 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c @@ -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: |