Skip to content

Commit 452d895

Browse files
arndbsre
authored andcommitted
power: rt9455: hide unused rt9455_boost_voltage_values
The rt9455_boost_voltage_values[] array is only used when USB PHY support is enabled, causing a W=1 warning otherwise: drivers/power/supply/rt9455_charger.c:200:18: error: 'rt9455_boost_voltage_values' defined but not used [-Werror=unused-const-variable=] Enclose the definition in the same #ifdef as the references to it. Fixes: e86d69d ("power_supply: Add support for Richtek RT9455 battery charger") Signed-off-by: Arnd Bergmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
1 parent 4cece76 commit 452d895

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/power/supply/rt9455_charger.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ static const int rt9455_voreg_values[] = {
192192
4450000, 4450000, 4450000, 4450000, 4450000, 4450000, 4450000, 4450000
193193
};
194194

195+
#if IS_ENABLED(CONFIG_USB_PHY)
195196
/*
196197
* When the charger is in boost mode, REG02[7:2] represent boost output
197198
* voltage.
@@ -207,6 +208,7 @@ static const int rt9455_boost_voltage_values[] = {
207208
5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000,
208209
5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000, 5600000,
209210
};
211+
#endif
210212

211213
/* REG07[3:0] (VMREG) in uV */
212214
static const int rt9455_vmreg_values[] = {

0 commit comments

Comments
 (0)