From: Arnd Bergmann <arnd@arndb.de>
To: Kishon Vijay Abraham I <kishon@ti.com>,
Arnd Bergmann <arnd@arndb.de>, Rob Herring <robh@kernel.org>,
Tony Lindgren <tony@atomide.com>,
Sebastian Reichel <sre@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] phy: mapphone-mdm6600: add gpiolib dependency
Date: Wed, 4 Apr 2018 12:27:19 +0200 [thread overview]
Message-ID: <20180404102733.3747591-1-arnd@arndb.de> (raw)
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.
Fixes: 5d1ebbda0318 ("phy: mapphone-mdm6600: Add USB PHY driver for MDM6600 on Droid 4")
Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/phy/motorola/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/phy/motorola/Kconfig b/drivers/phy/motorola/Kconfig
index 82651524ffb9..718f8729701d 100644
--- a/drivers/phy/motorola/Kconfig
+++ b/drivers/phy/motorola/Kconfig
@@ -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
--
2.9.0
next reply other threads:[~2018-04-04 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-04 10:27 Arnd Bergmann [this message]
2018-04-04 11:56 ` Sebastian Reichel
2018-04-05 20:28 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180404102733.3747591-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=kishon@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
--cc=tony@atomide.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome