Re: [PATCH 5/5] [media] st-cec: Fix module autoload

2016-10-18 Thread Benjamin Gaignard
Thanks,

Acked-by: Benjamin Gaignard 

2016-10-17 17:44 GMT+02:00 Javier Martinez Canillas :
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
> $
>
> After this patch:
>
> $ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
> alias:  of:N*T*Cst,stih-cecC*
> alias:  of:N*T*Cst,stih-cec
>
> Signed-off-by: Javier Martinez Canillas 
>
> ---
>
>  drivers/staging/media/st-cec/stih-cec.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/st-cec/stih-cec.c 
> b/drivers/staging/media/st-cec/stih-cec.c
> index 214344866a6b..19d3ff30c8f8 100644
> --- a/drivers/staging/media/st-cec/stih-cec.c
> +++ b/drivers/staging/media/st-cec/stih-cec.c
> @@ -363,6 +363,7 @@ static const struct of_device_id stih_cec_match[] = {
> },
> {},
>  };
> +MODULE_DEVICE_TABLE(of, stih_cec_match);
>
>  static struct platform_driver stih_cec_pdrv = {
> .probe  = stih_cec_probe,
> --
> 2.7.4
>



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog


Re: [PATCH 5/5] [media] st-cec: Fix module autoload

2016-10-18 Thread Benjamin Gaignard
Thanks,

Acked-by: Benjamin Gaignard 

2016-10-17 17:44 GMT+02:00 Javier Martinez Canillas :
> If the driver is built as a module, autoload won't work because the module
> alias information is not filled. So user-space can't match the registered
> device with the corresponding module.
>
> Export the module alias information using the MODULE_DEVICE_TABLE() macro.
>
> Before this patch:
>
> $ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
> $
>
> After this patch:
>
> $ modinfo drivers/staging/media//st-cec/stih-cec.ko | grep alias
> alias:  of:N*T*Cst,stih-cecC*
> alias:  of:N*T*Cst,stih-cec
>
> Signed-off-by: Javier Martinez Canillas 
>
> ---
>
>  drivers/staging/media/st-cec/stih-cec.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/staging/media/st-cec/stih-cec.c 
> b/drivers/staging/media/st-cec/stih-cec.c
> index 214344866a6b..19d3ff30c8f8 100644
> --- a/drivers/staging/media/st-cec/stih-cec.c
> +++ b/drivers/staging/media/st-cec/stih-cec.c
> @@ -363,6 +363,7 @@ static const struct of_device_id stih_cec_match[] = {
> },
> {},
>  };
> +MODULE_DEVICE_TABLE(of, stih_cec_match);
>
>  static struct platform_driver stih_cec_pdrv = {
> .probe  = stih_cec_probe,
> --
> 2.7.4
>



-- 
Benjamin Gaignard

Graphic Study Group

Linaro.org │ Open source software for ARM SoCs

Follow Linaro: Facebook | Twitter | Blog