diff mbox series

[3/3] staging: vc04_services: bcm2835-camera: Drop MODULE_ALIAS

Message ID 20231017200511.678223-4-umang.jain@ideasonboard.com (mailing list archive)
State New, archived
Headers show
Series vc04_services: Tweak module autoloading support | expand

Commit Message

Umang Jain Oct. 17, 2023, 8:05 p.m. UTC
Drop MODULE_ALIAS in favour of MODULE_DEVICE_TABLE as the module
alias should be picked from there.

Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
---
 .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Comments

Umang Jain Oct. 18, 2023, 5:12 a.m. UTC | #1
Hi,

On 10/18/23 1:35 AM, Umang Jain wrote:
> Drop MODULE_ALIAS in favour of MODULE_DEVICE_TABLE as the module
> alias should be picked from there.
>
> Signed-off-by: Umang Jain <umang.jain@ideasonboard.com>
> ---
>   .../staging/vc04_services/bcm2835-camera/bcm2835-camera.c  | 7 ++++++-
>   1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> index c873eace1437..3c18376003ff 100644
> --- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> +++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
> @@ -1995,9 +1995,15 @@ static void bcm2835_mmal_remove(struct vchiq_device *device)
>   	vchiq_mmal_finalise(instance);
>   }
>   
> +static const struct vchiq_bus_device_id id_table[] = {
> +	{ .name = "bcm2835-camera" }

This should be terminated with a NULL entry, sending v2 shortly.
> +};
> +MODULE_DEVICE_TABLE(vchiq_bus, id_table);
> +
>   static struct vchiq_driver bcm2835_camera_driver = {
>   	.probe		= bcm2835_mmal_probe,
>   	.remove		= bcm2835_mmal_remove,
> +	.id_table	= id_table,
>   	.driver		= {
>   		.name	= "bcm2835-camera",
>   	},
> @@ -2008,4 +2014,3 @@ module_vchiq_driver(bcm2835_camera_driver)
>   MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
>   MODULE_AUTHOR("Vincent Sanders");
>   MODULE_LICENSE("GPL");
> -MODULE_ALIAS("bcm2835-camera");
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 c873eace1437..3c18376003ff 100644
--- a/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
+++ b/drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c
@@ -1995,9 +1995,15 @@  static void bcm2835_mmal_remove(struct vchiq_device *device)
 	vchiq_mmal_finalise(instance);
 }
 
+static const struct vchiq_bus_device_id id_table[] = {
+	{ .name = "bcm2835-camera" }
+};
+MODULE_DEVICE_TABLE(vchiq_bus, id_table);
+
 static struct vchiq_driver bcm2835_camera_driver = {
 	.probe		= bcm2835_mmal_probe,
 	.remove		= bcm2835_mmal_remove,
+	.id_table	= id_table,
 	.driver		= {
 		.name	= "bcm2835-camera",
 	},
@@ -2008,4 +2014,3 @@  module_vchiq_driver(bcm2835_camera_driver)
 MODULE_DESCRIPTION("Broadcom 2835 MMAL video capture");
 MODULE_AUTHOR("Vincent Sanders");
 MODULE_LICENSE("GPL");
-MODULE_ALIAS("bcm2835-camera");