diff mbox series

[-next] power/reset: Add missing MODULE_DEVICE_TABLE

Message ID 20210410035040.11370-1-cuibixuan@huawei.com
State Accepted
Commit e318c3c2ae7d64ae47467044523bd3e2da5c5ce6
Headers show
Series [-next] power/reset: Add missing MODULE_DEVICE_TABLE | expand

Commit Message

Bixuan Cui April 10, 2021, 3:50 a.m. UTC
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/power/reset/restart-poweroff.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sebastian Reichel April 12, 2021, 7:59 p.m. UTC | #1
Hi,

On Sat, Apr 10, 2021 at 11:50:40AM +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>

> ---


Thanks, queued.

-- Sebastian

>  drivers/power/reset/restart-poweroff.c | 1 +

>  1 file changed, 1 insertion(+)

> 

> diff --git a/drivers/power/reset/restart-poweroff.c b/drivers/power/reset/restart-poweroff.c

> index d233daa5835b..04d4228119b2 100644

> --- a/drivers/power/reset/restart-poweroff.c

> +++ b/drivers/power/reset/restart-poweroff.c

> @@ -45,6 +45,7 @@ static const struct of_device_id of_restart_poweroff_match[] = {

>  	{ .compatible = "restart-poweroff", },

>  	{},

>  };

> +MODULE_DEVICE_TABLE(of, of_restart_poweroff_match);

>  

>  static struct platform_driver restart_poweroff_driver = {

>  	.probe = restart_poweroff_probe,

>
diff mbox series

Patch

diff --git a/drivers/power/reset/restart-poweroff.c b/drivers/power/reset/restart-poweroff.c
index d233daa5835b..04d4228119b2 100644
--- a/drivers/power/reset/restart-poweroff.c
+++ b/drivers/power/reset/restart-poweroff.c
@@ -45,6 +45,7 @@  static const struct of_device_id of_restart_poweroff_match[] = {
 	{ .compatible = "restart-poweroff", },
 	{},
 };
+MODULE_DEVICE_TABLE(of, of_restart_poweroff_match);
 
 static struct platform_driver restart_poweroff_driver = {
 	.probe = restart_poweroff_probe,