]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
phy: sun4i-usb: Fix not calling dev_err with a device
authorSean Anderson <seanga2@gmail.com>
Tue, 15 Sep 2020 14:45:04 +0000 (10:45 -0400)
committerTom Rini <trini@konsulko.com>
Wed, 30 Sep 2020 12:53:31 +0000 (08:53 -0400)
This uses phy's device

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
drivers/phy/allwinner/phy-sun4i-usb.c

index f050645044c9905327c29cd0ccd3aa9b29767ce2..7b9d3eefc5ed6f302c7984b43d2ac0111bf32ed8 100644 (file)
@@ -272,13 +272,15 @@ static int sun4i_usb_phy_init(struct phy *phy)
 
        ret = clk_enable(&usb_phy->clocks);
        if (ret) {
-               dev_err(dev, "failed to enable usb_%ldphy clock\n", phy->id);
+               dev_err(phy->dev, "failed to enable usb_%ldphy clock\n",
+                       phy->id);
                return ret;
        }
 
        ret = reset_deassert(&usb_phy->resets);
        if (ret) {
-               dev_err(dev, "failed to deassert usb_%ldreset reset\n", phy->id);
+               dev_err(phy->dev, "failed to deassert usb_%ldreset reset\n",
+                       phy->id);
                return ret;
        }
 
@@ -338,13 +340,15 @@ static int sun4i_usb_phy_exit(struct phy *phy)
 
        ret = clk_disable(&usb_phy->clocks);
        if (ret) {
-               dev_err(dev, "failed to disable usb_%ldphy clock\n", phy->id);
+               dev_err(phy->dev, "failed to disable usb_%ldphy clock\n",
+                       phy->id);
                return ret;
        }
 
        ret = reset_assert(&usb_phy->resets);
        if (ret) {
-               dev_err(dev, "failed to assert usb_%ldreset reset\n", phy->id);
+               dev_err(phy->dev, "failed to assert usb_%ldreset reset\n",
+                       phy->id);
                return ret;
        }