[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150430155527.GF6133@earth>
Date: Thu, 30 Apr 2015 17:55:27 +0200
From: Sebastian Reichel <sre@...nel.org>
To: Marek Belisko <marek@...delico.com>
Cc: dbaryshkov@...il.com, dwmw2@...radead.org,
linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
hns@...delico.com
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 <marek@...delico.com>
> ---
> 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 <giometti@...ux.it>");
> 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
Download attachment "signature.asc" of type "application/pgp-signature" (820 bytes)
Powered by blists - more mailing lists