diff mbox series

[-next] power: reset/supply: add missing MODULE_DEVICE_TABLE

Message ID 1620896701-53542-1-git-send-email-zou_wei@huawei.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [-next] power: reset/supply: add missing MODULE_DEVICE_TABLE | expand

Commit Message

Zou Wei May 13, 2021, 9:05 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: Zou Wei <zou_wei@huawei.com>
---
 drivers/power/reset/regulator-poweroff.c | 1 +
 drivers/power/supply/ab8500_btemp.c      | 1 +
 drivers/power/supply/ab8500_charger.c    | 1 +
 drivers/power/supply/ab8500_fg.c         | 1 +
 drivers/power/supply/charger-manager.c   | 1 +
 5 files changed, 5 insertions(+)

Comments

Sebastian Reichel June 4, 2021, 11:02 a.m. UTC | #1
Hi,

On Thu, May 13, 2021 at 05:05:01PM +0800, Zou Wei 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: Zou Wei <zou_wei@huawei.com>
> ---

Does not apply anymore. Also please split this into three patches,
one for regulator-poweroff, one for ab8500 and one for
charger-manager.

Thanks,

-- Sebastian

>  drivers/power/reset/regulator-poweroff.c | 1 +
>  drivers/power/supply/ab8500_btemp.c      | 1 +
>  drivers/power/supply/ab8500_charger.c    | 1 +
>  drivers/power/supply/ab8500_fg.c         | 1 +
>  drivers/power/supply/charger-manager.c   | 1 +
>  5 files changed, 5 insertions(+)
> 
> diff --git a/drivers/power/reset/regulator-poweroff.c b/drivers/power/reset/regulator-poweroff.c
> index f697088..2070120 100644
> --- a/drivers/power/reset/regulator-poweroff.c
> +++ b/drivers/power/reset/regulator-poweroff.c
> @@ -64,6 +64,7 @@ static const struct of_device_id of_regulator_poweroff_match[] = {
>  	{ .compatible = "regulator-poweroff", },
>  	{},
>  };
> +MODULE_DEVICE_TABLE(of, of_regulator_poweroff_match);
>  
>  static struct platform_driver regulator_poweroff_driver = {
>  	.probe = regulator_poweroff_probe,
> diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
> index fdfcd59..db1adc1 100644
> --- a/drivers/power/supply/ab8500_btemp.c
> +++ b/drivers/power/supply/ab8500_btemp.c
> @@ -1106,6 +1106,7 @@ static const struct of_device_id ab8500_btemp_match[] = {
>  	{ .compatible = "stericsson,ab8500-btemp", },
>  	{ },
>  };
> +MODULE_DEVICE_TABLE(of, ab8500_btemp_match);
>  
>  static struct platform_driver ab8500_btemp_driver = {
>  	.probe = ab8500_btemp_probe,
> diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
> index a9be10e..94da73e 100644
> --- a/drivers/power/supply/ab8500_charger.c
> +++ b/drivers/power/supply/ab8500_charger.c
> @@ -3644,6 +3644,7 @@ static const struct of_device_id ab8500_charger_match[] = {
>  	{ .compatible = "stericsson,ab8500-charger", },
>  	{ },
>  };
> +MODULE_DEVICE_TABLE(of, ab8500_charger_match);
>  
>  static struct platform_driver ab8500_charger_driver = {
>  	.probe = ab8500_charger_probe,
> diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
> index 0c7c01a..5a86afd 100644
> --- a/drivers/power/supply/ab8500_fg.c
> +++ b/drivers/power/supply/ab8500_fg.c
> @@ -3212,6 +3212,7 @@ static const struct of_device_id ab8500_fg_match[] = {
>  	{ .compatible = "stericsson,ab8500-fg", },
>  	{ },
>  };
> +MODULE_DEVICE_TABLE(of, ab8500_fg_match);
>  
>  static struct platform_driver ab8500_fg_driver = {
>  	.probe = ab8500_fg_probe,
> diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
> index 45da870..d67edb7 100644
> --- a/drivers/power/supply/charger-manager.c
> +++ b/drivers/power/supply/charger-manager.c
> @@ -1279,6 +1279,7 @@ static const struct of_device_id charger_manager_match[] = {
>  	},
>  	{},
>  };
> +MODULE_DEVICE_TABLE(of, charger_manager_match);
>  
>  static struct charger_desc *of_cm_parse_desc(struct device *dev)
>  {
> -- 
> 2.6.2
>
Zou Wei June 5, 2021, 12:48 a.m. UTC | #2
Hi Sebastian,

Thanks for your review, I will split the patch into three and resend soon.
On 2021/6/4 19:02, Sebastian Reichel wrote:
> Hi,
> 
> On Thu, May 13, 2021 at 05:05:01PM +0800, Zou Wei 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: Zou Wei <zou_wei@huawei.com>
>> ---
> 
> Does not apply anymore. Also please split this into three patches,
> one for regulator-poweroff, one for ab8500 and one for
> charger-manager.
> 
> Thanks,
> 
> -- Sebastian
> 
>>   drivers/power/reset/regulator-poweroff.c | 1 +
>>   drivers/power/supply/ab8500_btemp.c      | 1 +
>>   drivers/power/supply/ab8500_charger.c    | 1 +
>>   drivers/power/supply/ab8500_fg.c         | 1 +
>>   drivers/power/supply/charger-manager.c   | 1 +
>>   5 files changed, 5 insertions(+)
>>
diff mbox series

Patch

diff --git a/drivers/power/reset/regulator-poweroff.c b/drivers/power/reset/regulator-poweroff.c
index f697088..2070120 100644
--- a/drivers/power/reset/regulator-poweroff.c
+++ b/drivers/power/reset/regulator-poweroff.c
@@ -64,6 +64,7 @@  static const struct of_device_id of_regulator_poweroff_match[] = {
 	{ .compatible = "regulator-poweroff", },
 	{},
 };
+MODULE_DEVICE_TABLE(of, of_regulator_poweroff_match);
 
 static struct platform_driver regulator_poweroff_driver = {
 	.probe = regulator_poweroff_probe,
diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
index fdfcd59..db1adc1 100644
--- a/drivers/power/supply/ab8500_btemp.c
+++ b/drivers/power/supply/ab8500_btemp.c
@@ -1106,6 +1106,7 @@  static const struct of_device_id ab8500_btemp_match[] = {
 	{ .compatible = "stericsson,ab8500-btemp", },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, ab8500_btemp_match);
 
 static struct platform_driver ab8500_btemp_driver = {
 	.probe = ab8500_btemp_probe,
diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index a9be10e..94da73e 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -3644,6 +3644,7 @@  static const struct of_device_id ab8500_charger_match[] = {
 	{ .compatible = "stericsson,ab8500-charger", },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, ab8500_charger_match);
 
 static struct platform_driver ab8500_charger_driver = {
 	.probe = ab8500_charger_probe,
diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index 0c7c01a..5a86afd 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -3212,6 +3212,7 @@  static const struct of_device_id ab8500_fg_match[] = {
 	{ .compatible = "stericsson,ab8500-fg", },
 	{ },
 };
+MODULE_DEVICE_TABLE(of, ab8500_fg_match);
 
 static struct platform_driver ab8500_fg_driver = {
 	.probe = ab8500_fg_probe,
diff --git a/drivers/power/supply/charger-manager.c b/drivers/power/supply/charger-manager.c
index 45da870..d67edb7 100644
--- a/drivers/power/supply/charger-manager.c
+++ b/drivers/power/supply/charger-manager.c
@@ -1279,6 +1279,7 @@  static const struct of_device_id charger_manager_match[] = {
 	},
 	{},
 };
+MODULE_DEVICE_TABLE(of, charger_manager_match);
 
 static struct charger_desc *of_cm_parse_desc(struct device *dev)
 {