]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
usb: xhci: tegra: Remove redundant mutex when setting phy mode
authorDiogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Tue, 27 Jan 2026 15:11:48 +0000 (15:11 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 11 Mar 2026 13:59:26 +0000 (14:59 +0100)
As the PHY subsystem already synchronizes concurrent accesses to a PHY
instance with a core-internal mutex remove the driver specific mutex
synchronization.

Signed-off-by: Diogo Ivo <diogo.ivo@tecnico.ulisboa.pt>
Link: https://patch.msgid.link/20260127-diogo-tegra_phy-v2-2-787b9eed3ed5@tecnico.ulisboa.pt
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-tegra.c

index 3f6aa2440b05b99fa8cba8d106ea1da60bccb9a5..ed4b11f8d298e2191f13e39d1272b3534af7787f 100644 (file)
@@ -1357,15 +1357,11 @@ static void tegra_xhci_id_work(struct work_struct *work)
 
        dev_dbg(tegra->dev, "host mode %s\n", str_on_off(tegra->host_mode));
 
-       mutex_lock(&tegra->lock);
-
        if (tegra->host_mode)
                phy_set_mode_ext(phy, PHY_MODE_USB_OTG, USB_ROLE_HOST);
        else
                phy_set_mode_ext(phy, PHY_MODE_USB_OTG, USB_ROLE_NONE);
 
-       mutex_unlock(&tegra->lock);
-
        tegra->otg_usb3_port = tegra_xusb_padctl_get_usb3_companion(tegra->padctl,
                                                                    tegra->otg_usb2_port);