diff mbox series

[-next] hwmon: (gsc-hwmon) fix module autoloading

Message ID 20240814024555.3875387-1-liaochen4@huawei.com (mailing list archive)
State Accepted
Headers show
Series [-next] hwmon: (gsc-hwmon) fix module autoloading | expand

Commit Message

Liao Chen Aug. 14, 2024, 2:45 a.m. UTC
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/hwmon/gsc-hwmon.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Guenter Roeck Aug. 14, 2024, 3:22 a.m. UTC | #1
On Wed, Aug 14, 2024 at 02:45:55AM +0000, Liao Chen wrote:
> 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>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/gsc-hwmon.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c
> index cb2f01dc4326..4514f3ed90cc 100644
> --- a/drivers/hwmon/gsc-hwmon.c
> +++ b/drivers/hwmon/gsc-hwmon.c
> @@ -400,6 +400,7 @@ static const struct of_device_id gsc_hwmon_of_match[] = {
>  	{ .compatible = "gw,gsc-adc", },
>  	{}
>  };
> +MODULE_DEVICE_TABLE(of, gsc_hwmon_of_match);
>  
>  static struct platform_driver gsc_hwmon_driver = {
>  	.driver = {
diff mbox series

Patch

diff --git a/drivers/hwmon/gsc-hwmon.c b/drivers/hwmon/gsc-hwmon.c
index cb2f01dc4326..4514f3ed90cc 100644
--- a/drivers/hwmon/gsc-hwmon.c
+++ b/drivers/hwmon/gsc-hwmon.c
@@ -400,6 +400,7 @@  static const struct of_device_id gsc_hwmon_of_match[] = {
 	{ .compatible = "gw,gsc-adc", },
 	{}
 };
+MODULE_DEVICE_TABLE(of, gsc_hwmon_of_match);
 
 static struct platform_driver gsc_hwmon_driver = {
 	.driver = {