From: Gaston Gonzalez Date: Wed, 5 Jan 2022 20:35:44 +0000 (-0300) Subject: staging: vc04_services: rename functions containing bm2835_* to bcm2835_* X-Git-Tag: microblaze-v5.18~114^2~14 X-Git-Url: http://git.monstr.eu/?a=commitdiff_plain;h=d6776424667cbbfe15d2482a220b620d3257a9bb;p=linux-2.6-microblaze.git staging: vc04_services: rename functions 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 functions using bm2835_* to bcm2835_*. While at it, some realignments were made to improve readability. Suggested-by: Stefan Wahren Signed-off-by: Gaston Gonzalez Link: https://lore.kernel.org/r/d3b6f67421c75829105f793cfb9ec1414b926bf6.1641414449.git.gascoar@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c index 109021643c3f..159ac600d11e 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c @@ -1735,7 +1735,7 @@ static int mmal_init(struct bcm2835_mmal_dev *dev) &enable, sizeof(enable)); } - ret = bm2835_mmal_set_all_camera_controls(dev); + ret = bcm2835_mmal_set_all_camera_controls(dev); if (ret < 0) { v4l2_err(&dev->v4l2_dev, "%s: failed to set all camera controls: %d\n", __func__, ret); @@ -1769,8 +1769,7 @@ unreg_mmal: return ret; } -static int bm2835_mmal_init_device(struct bcm2835_mmal_dev *dev, - struct video_device *vfd) +static int bcm2835_mmal_init_device(struct bcm2835_mmal_dev *dev, struct video_device *vfd) { int ret; @@ -1908,7 +1907,7 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) } /* setup v4l controls */ - ret = bm2835_mmal_init_controls(dev, &dev->ctrl_handler); + ret = bcm2835_mmal_init_controls(dev, &dev->ctrl_handler); if (ret < 0) { v4l2_err(&dev->v4l2_dev, "%s: could not init controls: %d\n", __func__, ret); @@ -1940,7 +1939,7 @@ static int bcm2835_mmal_probe(struct platform_device *pdev) goto unreg_dev; /* initialise video devices */ - ret = bm2835_mmal_init_device(dev, &dev->vdev); + ret = bcm2835_mmal_init_device(dev, &dev->vdev); if (ret < 0) { v4l2_err(&dev->v4l2_dev, "%s: could not init device: %d\n", __func__, ret); diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h index 338b7c142ae3..84ba789af120 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h @@ -110,11 +110,9 @@ struct bcm2835_mmal_dev { unsigned int rgb_bgr_swapped; }; -int bm2835_mmal_init_controls( - struct bcm2835_mmal_dev *dev, - struct v4l2_ctrl_handler *hdl); +int bcm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, struct v4l2_ctrl_handler *hdl); -int bm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev); +int bcm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev); int set_framerate_params(struct bcm2835_mmal_dev *dev); /* Debug helpers */ diff --git a/drivers/staging/vc04_services/bcm2835-camera/controls.c b/drivers/staging/vc04_services/bcm2835-camera/controls.c index 03967a7d99a0..08fadc164b02 100644 --- a/drivers/staging/vc04_services/bcm2835-camera/controls.c +++ b/drivers/staging/vc04_services/bcm2835-camera/controls.c @@ -884,7 +884,7 @@ static int ctrl_set_scene_mode(struct bcm2835_mmal_dev *dev, return 0; } -static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) +static int bcm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) { struct bcm2835_mmal_dev *dev = container_of(ctrl->handler, struct bcm2835_mmal_dev, ctrl_handler); @@ -904,7 +904,7 @@ static int bm2835_mmal_s_ctrl(struct v4l2_ctrl *ctrl) } static const struct v4l2_ctrl_ops bm2835_mmal_ctrl_ops = { - .s_ctrl = bm2835_mmal_s_ctrl, + .s_ctrl = bcm2835_mmal_s_ctrl, }; static const struct bcm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { @@ -1246,7 +1246,7 @@ static const struct bcm2835_mmal_v4l2_ctrl v4l2_ctrls[V4L2_CTRL_COUNT] = { }, }; -int bm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev) +int bcm2835_mmal_set_all_camera_controls(struct bcm2835_mmal_dev *dev) { int c; int ret = 0; @@ -1311,8 +1311,7 @@ int set_framerate_params(struct bcm2835_mmal_dev *dev) return ret; } -int bm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, - struct v4l2_ctrl_handler *hdl) +int bcm2835_mmal_init_controls(struct bcm2835_mmal_dev *dev, struct v4l2_ctrl_handler *hdl) { int c; const struct bcm2835_mmal_v4l2_ctrl *ctrl;