diff mbox series

[5/6] staging: vc04_services: rename macros BM2835_MMAL_VERSION and BM2835_MMAL_MODULE_NAME

Message ID d450b9e22e5ab335a61591dbf0d2104031c9fc46.1641414449.git.gascoar@gmail.com (mailing list archive)
State New, archived
Headers show
Series staging: vc04_services: rename ocurrences of 'bm2835*' to 'bcm2835*' | expand

Commit Message

Gaston Gonzalez Jan. 5, 2022, 8:35 p.m. UTC
In the kernel, all names related to the chip BCM2835 are always named
bcm2835_*. To avoid confusion, and to make things more consistent,
rename the macros BM2835_MMAL_VERSION and BM2835_MMAL_MODULE_NAME
accordingly.

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>
---
 .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

Comments

Greg KH Jan. 6, 2022, 1:48 p.m. UTC | #1
On Wed, Jan 05, 2022 at 05:35:47PM -0300, Gaston Gonzalez wrote:
> In the kernel, all names related to the chip BCM2835 are always named
> bcm2835_*. To avoid confusion, and to make things more consistent,
> rename the macros BM2835_MMAL_VERSION and BM2835_MMAL_MODULE_NAME
> accordingly.
> 
> 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>
> ---
>  .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 14 ++++++--------
>  1 file changed, 6 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index aaf529f2186c..c729b1b7de71 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -33,8 +33,8 @@
>  #include "mmal-parameters.h"
>  #include "bcm2835-camera.h"
>  
> -#define BM2835_MMAL_VERSION "0.0.2"
> -#define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2"
> +#define BCM2835_MMAL_VERSION "0.0.2"

MODULE_VERSION means nothing when the code is in the kernel tree, this
shold just be removed entirely.

> +#define BCM2835_MMAL_MODULE_NAME "bcm2835-v4l2"

KBUILD_MODULE_NAME provides this, please delete this and just use that
instead.

This can be 2 different commits because of this.

thanks,

greg k-h
Gaston Gonzalez Jan. 7, 2022, 10:36 a.m. UTC | #2
On Thu, Jan 06, 2022 at 02:48:25PM +0100, Greg KH wrote:
> On Wed, Jan 05, 2022 at 05:35:47PM -0300, Gaston Gonzalez wrote:
> > In the kernel, all names related to the chip BCM2835 are always named
> > bcm2835_*. To avoid confusion, and to make things more consistent,
> > rename the macros BM2835_MMAL_VERSION and BM2835_MMAL_MODULE_NAME
> > accordingly.
> > 
> > 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>
> > ---
> >  .../vc04_services/bcm2835-camera/bcm2835-camera.c  | 14 ++++++--------
> >  1 file changed, 6 insertions(+), 8 deletions(-)
> > 
> > diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > index aaf529f2186c..c729b1b7de71 100644
> > --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> > @@ -33,8 +33,8 @@
> >  #include "mmal-parameters.h"
> >  #include "bcm2835-camera.h"
> >  
> > -#define BM2835_MMAL_VERSION "0.0.2"
> > -#define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2"
> > +#define BCM2835_MMAL_VERSION "0.0.2"
> 
> MODULE_VERSION means nothing when the code is in the kernel tree, this
> shold just be removed entirely.
> 
> > +#define BCM2835_MMAL_MODULE_NAME "bcm2835-v4l2"
> 
> KBUILD_MODULE_NAME provides this, please delete this and just use that
> instead.
> 
> This can be 2 different commits because of this.
> 
> thanks,
> 
> greg k-h
> 

Hi Greg,

Thanks for reviewing.

Ok, will do.

Gaston
diff mbox series

Patch

diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
index aaf529f2186c..c729b1b7de71 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -33,8 +33,8 @@ 
 #include "mmal-parameters.h"
 #include "bcm2835-camera.h"
 
-#define BM2835_MMAL_VERSION "0.0.2"
-#define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2"
+#define BCM2835_MMAL_VERSION "0.0.2"
+#define BCM2835_MMAL_MODULE_NAME "bcm2835-v4l2"
 #define MIN_WIDTH 32
 #define MIN_HEIGHT 32
 #define MIN_BUFFER_SIZE (80 * 1024)
@@ -1894,8 +1894,7 @@  static int bcm2835_mmal_probe(struct platform_device *pdev)
 		dev->capture.fmt = &formats[3]; /* JPEG */
 
 		/* v4l device registration */
-		dev->camera_num = v4l2_device_set_name(&dev->v4l2_dev,
-						       BM2835_MMAL_MODULE_NAME,
+		dev->camera_num = v4l2_device_set_name(&dev->v4l2_dev, BCM2835_MMAL_MODULE_NAME,
 						       &camera_instance);
 		ret = v4l2_device_register(NULL, &dev->v4l2_dev);
 		if (ret) {
@@ -1954,9 +1953,8 @@  static int bcm2835_mmal_probe(struct platform_device *pdev)
 			goto unreg_dev;
 		}
 
-		v4l2_info(&dev->v4l2_dev,
-			  "Broadcom 2835 MMAL video capture ver %s loaded.\n",
-			  BM2835_MMAL_VERSION);
+		v4l2_info(&dev->v4l2_dev, "Broadcom 2835 MMAL video capture ver %s loaded.\n",
+			  BCM2835_MMAL_VERSION);
 
 		gdev[camera] = dev;
 	}
@@ -2008,5 +2006,5 @@  module_platform_driver(bcm2835_camera_driver)
 MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
 MODULE_AUTHOR("Vincent Sanders");
 MODULE_LICENSE("GPL");
-MODULE_VERSION(BM2835_MMAL_VERSION);
+MODULE_VERSION(BCM2835_MMAL_VERSION);
 MODULE_ALIAS("platform:bcm2835-camera");