[PATCH -next 3/3] net: airoha: fix module autoloading

Liao Chen posted 3 patches 3 weeks, 3 days ago
[PATCH -next 3/3] net: airoha: fix module autoloading
Posted by Liao Chen 3 weeks, 3 days ago
Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
based on the alias from of_device_id table.

Signed-off-by: Liao Chen <liaochen4@huawei.com>
---
 drivers/net/ethernet/mediatek/airoha_eth.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
index 1c5b85a86df1..a80c1fae5c2d 100644
--- a/drivers/net/ethernet/mediatek/airoha_eth.c
+++ b/drivers/net/ethernet/mediatek/airoha_eth.c
@@ -2715,6 +2715,7 @@ static const struct of_device_id of_airoha_match[] = {
 	{ .compatible = "airoha,en7581-eth" },
 	{ /* sentinel */ }
 };
+MODULE_DEVICE_TABLE(of, of_airoha_match);
 
 static struct platform_driver airoha_driver = {
 	.probe = airoha_probe,
-- 
2.34.1
Re: [PATCH -next 3/3] net: airoha: fix module autoloading
Posted by Lorenzo Bianconi 3 weeks, 3 days ago
> Add MODULE_DEVICE_TABLE(), so modules could be properly autoloaded
> based on the alias from of_device_id table.
> 
> Signed-off-by: Liao Chen <liaochen4@huawei.com>

Acked-by: Lorenzo Bianconi <lorenzo@kernel.org>

> ---
>  drivers/net/ethernet/mediatek/airoha_eth.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/ethernet/mediatek/airoha_eth.c b/drivers/net/ethernet/mediatek/airoha_eth.c
> index 1c5b85a86df1..a80c1fae5c2d 100644
> --- a/drivers/net/ethernet/mediatek/airoha_eth.c
> +++ b/drivers/net/ethernet/mediatek/airoha_eth.c
> @@ -2715,6 +2715,7 @@ static const struct of_device_id of_airoha_match[] = {
>  	{ .compatible = "airoha,en7581-eth" },
>  	{ /* sentinel */ }
>  };
> +MODULE_DEVICE_TABLE(of, of_airoha_match);
>  
>  static struct platform_driver airoha_driver = {
>  	.probe = airoha_probe,
> -- 
> 2.34.1
>