[-next] i2c: sprd: Add missing MODULE_DEVICE_TABLE

Message ID 20210410035044.11418-1-cuibixuan@huawei.com
State New
Headers show
Series
  • [-next] i2c: sprd: Add missing MODULE_DEVICE_TABLE
Related show

Commit Message

Bixuan Cui April 10, 2021, 3:50 a.m.
This patch adds missing MODULE_DEVICE_TABLE definition which generates
correct modalias for automatic loading of this driver when it is built
as an external module.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>
---
 drivers/i2c/busses/i2c-sprd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Baolin Wang April 12, 2021, 2:04 p.m. | #1
On Sat, Apr 10, 2021 at 11:51 AM Bixuan Cui <cuibixuan@huawei.com> wrote:
>

> This patch adds missing MODULE_DEVICE_TABLE definition which generates

> correct modalias for automatic loading of this driver when it is built

> as an external module.

>

> Reported-by: Hulk Robot <hulkci@huawei.com>

> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>


LGTM.
Reviewed-by: Baolin Wang <baolin.wang7@gmail.com>


> ---

>  drivers/i2c/busses/i2c-sprd.c | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c

> index 2917fecf6c80..9f77d1ddbaf8 100644

> --- a/drivers/i2c/busses/i2c-sprd.c

> +++ b/drivers/i2c/busses/i2c-sprd.c

> @@ -640,6 +640,7 @@ static const struct of_device_id sprd_i2c_of_match[] = {

>         { .compatible = "sprd,sc9860-i2c", },

>         {},

>  };

> +MODULE_DEVICE_TABLE(of, sprd_i2c_of_match);

>

>  static struct platform_driver sprd_i2c_driver = {

>         .probe = sprd_i2c_probe,

>



-- 
Baolin Wang
Wolfram Sang April 13, 2021, 12:35 p.m. | #2
On Sat, Apr 10, 2021 at 11:50:44AM +0800, Bixuan Cui wrote:
> This patch adds missing MODULE_DEVICE_TABLE definition which generates

> correct modalias for automatic loading of this driver when it is built

> as an external module.

> 

> Reported-by: Hulk Robot <hulkci@huawei.com>

> Signed-off-by: Bixuan Cui <cuibixuan@huawei.com>


Applied to for-next, thanks!

Patch

diff --git a/drivers/i2c/busses/i2c-sprd.c b/drivers/i2c/busses/i2c-sprd.c
index 2917fecf6c80..9f77d1ddbaf8 100644
--- a/drivers/i2c/busses/i2c-sprd.c
+++ b/drivers/i2c/busses/i2c-sprd.c
@@ -640,6 +640,7 @@  static const struct of_device_id sprd_i2c_of_match[] = {
 	{ .compatible = "sprd,sc9860-i2c", },
 	{},
 };
+MODULE_DEVICE_TABLE(of, sprd_i2c_of_match);
 
 static struct platform_driver sprd_i2c_driver = {
 	.probe = sprd_i2c_probe,