diff mbox series

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

Message ID 20190612091722.9377-4-vkoul@kernel.org
State New
Headers show
Series clk: qcom: Add support for SM8150 GCC | expand

Commit Message

Vinod Koul June 12, 2019, 9:17 a.m. UTC
MODULE_ALIAS was missing for this driver which can be built as a
module, so add the MODULE_ALIAS.

Signed-off-by: Vinod Koul <vkoul@kernel.org>

---
 drivers/clk/qcom/gcc-qcs404.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.20.1

Comments

Bjorn Andersson June 17, 2019, 4:26 a.m. UTC | #1
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@kernel.org>

> ---

>  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

>
Vinod Koul June 24, 2019, 7:55 a.m. UTC | #2
On 16-06-19, 21:26, Bjorn Andersson wrote:
> 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.


Thanks for the explanation Bjorn :)
> 

> So, unless we're going to support module autoloading of this driver from

> a board file no alias should be needed.


Nope we dont, so will drop this one and as well as from SM8150 driver

-- 
~Vinod
diff mbox series

Patch

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");