mbox series

[v3,0/3] staging: vc04_services: Tweak module autoloading support

Message ID 20231019090128.430297-1-umang.jain@ideasonboard.com (mailing list archive)
Headers show
Series staging: vc04_services: Tweak module autoloading support | expand

Message

Umang Jain Oct. 19, 2023, 9:01 a.m. UTC
As explained by Greg KH in [1], we should not be using MODULE_ALIAS
to auto load modules within VC04. Drop that, in favour of
MODULE_DEVICE_TABLE. This series addresses the suggestion.

Patch 1/3 adds vchiq_bus_device_id and supporting entries in 
script/mod/file2alias.c

Patch 2/3 drops MODULE_ALIAS from bcm2835-audio in favour
of MODULE_DEVICE_TABLE.

Patch 3/3 drops MODULE_ALIAS from bcm2835-camera in favour
of MODULE_DEVICE_TABLE.

[1]:  https://lore.kernel.org/linux-media/2023100955-stunt-equate-c6fa@gregkh/

--
Changes in v3:
- Drop "_bus" suffix from all patches (and commit message)
  as pointed out in v2 review

Changes in v2: 
- NULL terminate device_id_table arrays (in 2/3 and 3/3)

Umang Jain (3):
  staging: vc04_services: Support module autoloading using
    MODULE_DEVICE_TABLE
  staging: vc04_services: bcm2835-audio: Drop MODULE_ALIAS
  staging: vc04_services: bcm2835-camera: Drop MODULE_ALIAS

 drivers/staging/vc04_services/bcm2835-audio/bcm2835.c    | 8 +++++++-
 .../vc04_services/bcm2835-camera/bcm2835-camera.c        | 8 +++++++-
 .../vc04_services/interface/vchiq_arm/vchiq_bus.c        | 2 +-
 .../vc04_services/interface/vchiq_arm/vchiq_bus.h        | 3 +++
 include/linux/mod_devicetable.h                          | 4 ++++
 scripts/mod/devicetable-offsets.c                        | 3 +++
 scripts/mod/file2alias.c                                 | 9 +++++++++
 7 files changed, 34 insertions(+), 3 deletions(-)

Comments

Kieran Bingham Oct. 19, 2023, 2:02 p.m. UTC | #1
Quoting Umang Jain (2023-10-19 10:01:25)
> As explained by Greg KH in [1], we should not be using MODULE_ALIAS
> to auto load modules within VC04. Drop that, in favour of
> MODULE_DEVICE_TABLE. This series addresses the suggestion.
> 
> Patch 1/3 adds vchiq_bus_device_id and supporting entries in 
> script/mod/file2alias.c
> 
> Patch 2/3 drops MODULE_ALIAS from bcm2835-audio in favour
> of MODULE_DEVICE_TABLE.
> 
> Patch 3/3 drops MODULE_ALIAS from bcm2835-camera in favour
> of MODULE_DEVICE_TABLE.
> 
> [1]:  https://lore.kernel.org/linux-media/2023100955-stunt-equate-c6fa@gregkh/

Does this series now complete the task in
drivers/staging/vc04_services/interface/TODO? :

> * Get rid of all non essential global structures and create a proper
> per device structure

The series looks good to me though:


Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> 
> --
> Changes in v3:
> - Drop "_bus" suffix from all patches (and commit message)
>   as pointed out in v2 review
> 
> Changes in v2: 
> - NULL terminate device_id_table arrays (in 2/3 and 3/3)
> 
> Umang Jain (3):
>   staging: vc04_services: Support module autoloading using
>     MODULE_DEVICE_TABLE
>   staging: vc04_services: bcm2835-audio: Drop MODULE_ALIAS
>   staging: vc04_services: bcm2835-camera: Drop MODULE_ALIAS
> 
>  drivers/staging/vc04_services/bcm2835-audio/bcm2835.c    | 8 +++++++-
>  .../vc04_services/bcm2835-camera/bcm2835-camera.c        | 8 +++++++-
>  .../vc04_services/interface/vchiq_arm/vchiq_bus.c        | 2 +-
>  .../vc04_services/interface/vchiq_arm/vchiq_bus.h        | 3 +++
>  include/linux/mod_devicetable.h                          | 4 ++++
>  scripts/mod/devicetable-offsets.c                        | 3 +++
>  scripts/mod/file2alias.c                                 | 9 +++++++++
>  7 files changed, 34 insertions(+), 3 deletions(-)
> 
> -- 
> 2.40.1
>