[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20151016144705.GG28216@pali>
Date: Fri, 16 Oct 2015 16:47:05 +0200
From: Pali Rohár <pali.rohar@...il.com>
To: Sebastian Reichel <sre@...nel.org>
Cc: "Andrew F . Davis" <afd@...com>, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/3] power: bq27xxx_battery: fix defined but not used
warnings
On Friday 16 October 2015 15:44:12 Sebastian Reichel wrote:
> If BQ27XXX is enabled, but neither I2C based initialization, nor
> platform based initialization are activated, bq27xxx_powersupply_init
> and bq27xxx_powersupply_unregister are defined but not used.
>
> This configuration doesn't make sense, but there is no easy way
> to make it unavailable in the build system, so just mark the
> functions as __maybe_unused instead.
>
What about?
#if defined(CONFIG_1) || defined(CONFIG_2)
#define NEED_POWER_SUPPLY
#endif
And then wrap power supply code into #ifdef NEED_POWER_SUPPLY?
--
Pali Rohár
pali.rohar@...il.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists