Re: [PATCH v3 2/2] usb: dwc3: drd: Improve dwc3_get_extcon() style

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

 



On Sun, Dec 13, 2020 at 5:27 AM Sam Protsenko
<semen.protsenko@xxxxxxxxxx> wrote:
>
> Commit c73b41955ee4 ("usb: dwc3: drd: Avoid error when extcon is

The previous change ("...

(because we don't know the actual commit id)

> missing") changed the code flow in dwc3_get_extcon() function, leading
> to unnecessary if-branch. This patch does housekeeping by reworking the
> code for obtaining extcon device from the "port" node. While at it, add

an extcon

> the  comment from mentioned code block, explaining how checking the port
> availability helps to avoid the misleading error.

...

> +       /*
> +        * Try to get extcon device from USB PHY controller's "port" node.

an extcon
the USB

> +        * Check if it has the "port" node first, to avoid printing the error
> +        * message from underlying code, as it's a valid case: extcon device
> +        * (and "port" node) may be missing in case of "usb-role-switch" or OTG
> +        * mode.
> +        */

To me it sounds like this should be in the previous patch.

-- 
With Best Regards,
Andy Shevchenko



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

  Powered by Linux