staging: vc04_services: cleanup macros BM2835_MMAL_VERSION and BM2835_MMAL_MODULE_NAME
Subsystems (3)
cover staging: vc04_services: cleanup macros BM2835_MMAL_VERSION and BM2835_MMAL_MODULE_NAME
These two patches cleanup the macros BM2835_MMAL_VERSION and BM2835_MMAL_MODULE_NAME.
Gaston Gonzalez (2):
staging: vc04_services: remove unneeded MODULE_VERSION() usage
staging: vc04_services: use KBUILD_MODNAME instead of own module name
definition
.../vc04_services/bcm2835-camera/bcm2835-camera.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
Signature · 1 line
2.34.1
PATCH 1/2 staging: vc04_services: remove unneeded MODULE_VERSION() usage
MODULE_VERSION() is useless for in-tree drivers given that only the kernel version matters. Hence, remove it.
While at it, one realignment was made to improve readability.
Suggested by: Greg Kroah-Hartman <[email protected]>
--- .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-)
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +1 -5
@@ -33,7 +33,6 @@#include "mmal-parameters.h" #include "bcm2835-camera.h" -#define BM2835_MMAL_VERSION "0.0.2"#define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2"#define MIN_WIDTH 32#define MIN_HEIGHT 32
@@ -1954,9 +1953,7 @@ 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 loaded.\n" ); gdev[camera] = dev; }
@@ -2008,5 +2005,4 @@ 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_ALIAS ("platform:bcm2835-camera" );
Signature · 1 line
2.34.1
PATCH 2/2 staging: vc04_services: use KBUILD_MODNAME instead of own module name definition
In reply to Gaston GonzalezRemove own module name definition and use KBUILD_MODNAME instead, which is the standard way of getting the module name.
While at it, one realignment was made to improve readability.
--- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c +1 -3
@@ -33,7 +33,6 @@#include "mmal-parameters.h" #include "bcm2835-camera.h" -#define BM2835_MMAL_MODULE_NAME "bcm2835-v4l2"#define MIN_WIDTH 32#define MIN_HEIGHT 32#define MIN_BUFFER_SIZE (80 * 1024)
@@ -1893,8 +1892,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,KBUILD_MODNAME , &camera_instance); ret =v4l2_device_register (NULL , &dev->v4l2_dev);if (ret) {
Signature · 1 line
2.34.1