phy: mapphone-mdm6600: add gpiolib dependency
PATCH 1/1 phy: mapphone-mdm6600: add gpiolib dependency
Without gpiolib, the gpiod_get_array_value_cansleep() is an empty stub, so gcc notices that the resulting array is never initialized:
drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[0]' is used uninitialized in this function [-Werror=uninitialized]
val |= values[i] << i;
~~~~~~^~~drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[1]' is used uninitialized in this function [-Werror=uninitialized] drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[2]' is used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
With gpiolib enabled, this can't happen and we don't get the warning, so let's just add a Kconfig dependency for it.
--- drivers/phy/motorola/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/phy/motorola/Kconfig +1 -1
@@ -13,7 +13,7 @@ config PHY_CPCAP_USB config PHY_MAPPHONE_MDM6600 tristate "Motorola Mapphone MDM6600 modem USB PHY driver" - depends on OF && USB_SUPPORT + depends on OF && USB_SUPPORT && GPIOLIB select GENERIC_PHY help Enable this for MDM6600 USB modem to work on Motorola phones
Signature · 1 line
2.9.0
Hi,
Quoted 11 lines · Arnd Bergmann
Without gpiolib, the
gpiod_get_array_value_cansleep()is an empty stub, so gcc notices that the resulting array is never initialized:
drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[0]' is used uninitialized in this function [-Werror=uninitialized]val |= values[i] << i; ~~~~~~^~~
drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[1]' is used uninitialized in this function [-Werror=uninitialized]drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[2]' is used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
Quoted 6 lines
With gpiolib enabled, this can't happen and we don't get the warning, so let's just add a
Kconfigdependency for it.Fixes 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")Cc Tony Lindgren <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>
-- Sebastian
Quoted 20 lines
--- drivers/phy/motorola/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/phy/motorola/Kconfig +1
-1@@ -13,7 +13,7 @@ config PHY_CPCAP_USB config PHY_MAPPHONE_MDM6600 tristate "Motorola Mapphone MDM6600 modem USB PHY driver" - depends on OF && USB_SUPPORT + depends on OF && USB_SUPPORT && GPIOLIB select GENERIC_PHY help Enable this for MDM6600 USB modem to work on Motorola phonesSignature · 1 line
2.9.0
Tony Lindgren
Acked-byQuoted 14 lines · Sebastian Reichel
Hi,
Quoted 11 lines · Arnd Bergmann
Without gpiolib, the
gpiod_get_array_value_cansleep()is an empty stub, so gcc notices that the resulting array is never initialized:
drivers/phy/motorola/phy-mapphone-mdm6600.c: In function 'phy_mdm6600_status':drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[0]' is used uninitialized in this function [-Werror=uninitialized]val |= values[i] << i; ~~~~~~^~~
drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[1]' is used uninitialized in this function [-Werror=uninitialized]drivers/phy/motorola/phy-mapphone-mdm6600.c:188:16: error: 'values[2]' is used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
Quoted 8 lines
Quoted 6 lines
With gpiolib enabled, this can't happen and we don't get the warning, so let's just add a
Kconfigdependency for it.Fixes 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")Cc Tony Lindgren <[email protected]>Signed-off-by Arnd Bergmann <[email protected]>Reviewed-by Sebastian Reichel <[email protected]>