Re: [PATCH v2 3/5] clk: qcom: gcc-qcs404: Add MODULE_ALIAS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed 12 Jun 02:17 PDT 2019, Vinod Koul wrote:

> MODULE_ALIAS was missing for this driver which can be built as a
> module, so add the MODULE_ALIAS.
> 

MODULE_ALIAS() serves the purpose of providing an module alias for the
driver, which allows the automatic kernel module loader to insmod the
driver as a device needing it is being registered.

When the device is instantiated through the OF code path the compatible
will be matched against the MODULE_DEVICE_TABLE(of, ) and if the device
is programmatically registered (through platform_device_register_*())
then the alias "platform:XYZ" will be used.


So, unless we're going to support module autoloading of this driver from
a board file no alias should be needed.

Regards,
Bjorn

> Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
> ---
>  drivers/clk/qcom/gcc-qcs404.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/clk/qcom/gcc-qcs404.c b/drivers/clk/qcom/gcc-qcs404.c
> index a54807eb3b28..eb3ac7a26fb8 100644
> --- a/drivers/clk/qcom/gcc-qcs404.c
> +++ b/drivers/clk/qcom/gcc-qcs404.c
> @@ -2828,3 +2828,4 @@ module_exit(gcc_qcs404_exit);
>  
>  MODULE_DESCRIPTION("Qualcomm GCC QCS404 Driver");
>  MODULE_LICENSE("GPL v2");
> +MODULE_ALIAS("platform:gcc-qcs404");
> -- 
> 2.20.1
> 



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux