aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/phy/phy-sun4i-usb.c
diff options
context:
space:
mode:
authorJames Morris <james.l.morris@oracle.com>2015-11-23 22:46:28 +1100
committerJames Morris <james.l.morris@oracle.com>2015-11-23 22:46:28 +1100
commitebd68df3f24b318d391d15c458d6f43f340ba36a (patch)
treef0277bc4b853abe5db1d30fa4e10b05bba7f2ac5 /drivers/phy/phy-sun4i-usb.c
parentsecurity/capability.h: cap_issubset/isclear can be boolean (diff)
parentLinux 4.4-rc2 (diff)
downloadlinux-dev-ebd68df3f24b318d391d15c458d6f43f340ba36a.tar.xz
linux-dev-ebd68df3f24b318d391d15c458d6f43f340ba36a.zip
Sync to Linus v4.4-rc2 for LSM developers.
Diffstat (limited to 'drivers/phy/phy-sun4i-usb.c')
-rw-r--r--drivers/phy/phy-sun4i-usb.c22
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/phy/phy-sun4i-usb.c b/drivers/phy/phy-sun4i-usb.c
index 731b395d6e6a..b12964b70625 100644
--- a/drivers/phy/phy-sun4i-usb.c
+++ b/drivers/phy/phy-sun4i-usb.c
@@ -551,19 +551,15 @@ static int sun4i_usb_phy_probe(struct platform_device *pdev)
if (IS_ERR(data->base))
return PTR_ERR(data->base);
- data->id_det_gpio = devm_gpiod_get(dev, "usb0_id_det", GPIOD_IN);
- if (IS_ERR(data->id_det_gpio)) {
- if (PTR_ERR(data->id_det_gpio) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
- data->id_det_gpio = NULL;
- }
-
- data->vbus_det_gpio = devm_gpiod_get(dev, "usb0_vbus_det", GPIOD_IN);
- if (IS_ERR(data->vbus_det_gpio)) {
- if (PTR_ERR(data->vbus_det_gpio) == -EPROBE_DEFER)
- return -EPROBE_DEFER;
- data->vbus_det_gpio = NULL;
- }
+ data->id_det_gpio = devm_gpiod_get_optional(dev, "usb0_id_det",
+ GPIOD_IN);
+ if (IS_ERR(data->id_det_gpio))
+ return PTR_ERR(data->id_det_gpio);
+
+ data->vbus_det_gpio = devm_gpiod_get_optional(dev, "usb0_vbus_det",
+ GPIOD_IN);
+ if (IS_ERR(data->vbus_det_gpio))
+ return PTR_ERR(data->vbus_det_gpio);
if (of_find_property(np, "usb0_vbus_power-supply", NULL)) {
data->vbus_power_supply = devm_power_supply_get_by_phandle(dev,