Re: [PATCHv2] usb: dwc2: use devm_phy_optional_get

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

On Tue, Oct 27, 2015 at 12:41:43AM +0000, John Youn wrote:
> On 10/26/2015 2:29 AM, Alexander Aring wrote:
> > This patch changes devm_phy_get to devm_phy_optional_get. Which fixes the
> > error handling when trying to get the phy. Currently on all errors we
> > try to look for an old style USB PHY. With this patch we try to look for
> > an old USB PHY when devm_phy_get returns -ENOENT
> 
> Should be -ENODEV

Hmm, that's strange.

devm_gpiod_get_index_optional tests against -ENOENT. Maybe we need:

 	ret = of_parse_phandle_with_args(np, "phys", "#phy-cells",
 		index, &args);
 	if (ret)
-		return ERR_PTR(-ENODEV);
+		return ERR_PTR(ret);
 

in _of_phy_get (drivers/phy/phy-core.c) to make the phy functions behave
identically?

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux