Thread (18 messages) 18 messages, 5 authors, 2023-02-03

Re: [PATCH v2 9/9] usb: host: ohci-exynos: Convert to devm_of_phy_optional_get()

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2023-01-25 14:39:49
Also in: linux-arm-kernel, linux-doc, linux-pci, linux-phy, linux-samsung-soc, linux-tegra, linux-usb

On Tue, Jan 24, 2023 at 07:37:28PM +0100, Geert Uytterhoeven wrote:
Use the new devm_of_phy_optional_get() helper instead of open-coding the
same operation.

As devm_of_phy_optional_get() returns NULL if either the PHY cannot be
found, or if support for the PHY framework is not enabled, it is no
longer needed to check for -ENODEV or -ENOSYS.

This lets us drop several checks for IS_ERR(), as phy_power_{on,off}()
handle NULL parameters fine.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help