2015-04-28 20:23:24

by Marek Belisko

[permalink] [raw]
Subject: [PATCH] power: bq27x00_battery: Add missing MODULE_ALIAS

Without MODULE_ALIAS bq27x00_battery module won't get loaded automatically.

Signed-off-by: Marek Belisko <[email protected]>
---
drivers/power/bq27x00_battery.c | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c
index a57433d..542927e 100644
--- a/drivers/power/bq27x00_battery.c
+++ b/drivers/power/bq27x00_battery.c
@@ -1109,6 +1109,12 @@ static void __exit bq27x00_battery_exit(void)
}
module_exit(bq27x00_battery_exit);

+#ifdef CONFIG_BATTERY_BQ27X00_PLATFORM
+MODULE_ALIAS("platform:bq27000-battery");
+#else
+MODULE_ALIAS("i2c:bq27000-battery");
+#endif
+
MODULE_AUTHOR("Rodolfo Giometti <[email protected]>");
MODULE_DESCRIPTION("BQ27x00 battery monitor driver");
MODULE_LICENSE("GPL");
--
1.9.1


2015-04-30 15:55:36

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCH] power: bq27x00_battery: Add missing MODULE_ALIAS

Hi,

On Tue, Apr 28, 2015 at 10:23:06PM +0200, Marek Belisko wrote:
> Without MODULE_ALIAS bq27x00_battery module won't get loaded
> automatically.
>
> Signed-off-by: Marek Belisko <[email protected]>
> ---
> drivers/power/bq27x00_battery.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c
> index a57433d..542927e 100644
> --- a/drivers/power/bq27x00_battery.c
> +++ b/drivers/power/bq27x00_battery.c
> @@ -1109,6 +1109,12 @@ static void __exit bq27x00_battery_exit(void)
> }
> module_exit(bq27x00_battery_exit);
>
> +#ifdef CONFIG_BATTERY_BQ27X00_PLATFORM
> +MODULE_ALIAS("platform:bq27000-battery");
> +#else
> +MODULE_ALIAS("i2c:bq27000-battery");
> +#endif
> +
> MODULE_AUTHOR("Rodolfo Giometti <[email protected]>");
> MODULE_DESCRIPTION("BQ27x00 battery monitor driver");
> MODULE_LICENSE("GPL");

NAK. You should set the alias by checking for
CONFIG_BATTERY_BQ27X00_PLATFORM and CONFIG_BATTERY_BQ27X00_I2C
respectively, so that all scenarios are handled.

-- Sebastian


Attachments:
(No filename) (1.04 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2015-04-30 20:06:11

by Marek Belisko

[permalink] [raw]
Subject: [PATCH] power: bq27x00_battery: Add missing MODULE_ALIAS

Without MODULE_ALIAS bq27x00_battery module won't get loaded automatically.

Signed-off-by: Marek Belisko <[email protected]>
---
drivers/power/bq27x00_battery.c | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c
index a57433d..b6b9837 100644
--- a/drivers/power/bq27x00_battery.c
+++ b/drivers/power/bq27x00_battery.c
@@ -1109,6 +1109,14 @@ static void __exit bq27x00_battery_exit(void)
}
module_exit(bq27x00_battery_exit);

+#ifdef CONFIG_BATTERY_BQ27X00_PLATFORM
+MODULE_ALIAS("platform:bq27000-battery");
+#endif
+
+#ifdef CONFIG_BATTERY_BQ27X00_I2C
+MODULE_ALIAS("i2c:bq27000-battery");
+#endif
+
MODULE_AUTHOR("Rodolfo Giometti <[email protected]>");
MODULE_DESCRIPTION("BQ27x00 battery monitor driver");
MODULE_LICENSE("GPL");
--
1.9.1

2015-05-01 21:03:51

by Sebastian Reichel

[permalink] [raw]
Subject: Re: [PATCH] power: bq27x00_battery: Add missing MODULE_ALIAS

Hi,

On Thu, Apr 30, 2015 at 10:05:58PM +0200, Marek Belisko wrote:
> Without MODULE_ALIAS bq27x00_battery module won't get loaded
> automatically.

Thanks, queued into fixes.

-- Sebastian


Attachments:
(No filename) (190.00 B)
signature.asc (819.00 B)
Digital signature
Download all attachments