]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
usb: host: xhci: Replace 0/1 values with boolean
authorAnurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Sat, 30 Mar 2019 10:23:17 +0000 (10:23 +0000)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 3 Apr 2019 08:31:23 +0000 (10:31 +0200)
This patch replaces 0/1 values used in xhci-plat.c
with boolean values for ease of understanding

Signed-off-by: Anurag Kumar Vulisha <anurag.kumar.vulisha@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/usb/host/xhci-plat.c

index 8c4aabe2cd25a728560f8fcae2bbdf55546c22e9..1e5cf019cd4d1e90bfc2f8783876ce48e922cfe1 100644 (file)
@@ -168,8 +168,9 @@ static int usb_otg_set_host(struct device *dev, struct usb_hcd *hcd, bool yes)
                        goto disable_phy;
                }
 
-       } else
+       } else {
                goto disable_phy;
+       }
 
        return 0;
 
@@ -355,7 +356,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
        if (ret)
                goto dealloc_usb2_hcd;
 
-       ret = usb_otg_set_host(&pdev->dev, hcd, 1);
+       ret = usb_otg_set_host(&pdev->dev, hcd, true);
        if (ret)
                goto dealloc_usb2_hcd;
 
@@ -405,11 +406,11 @@ static int xhci_plat_remove(struct platform_device *dev)
 
        xhci->xhc_state |= XHCI_STATE_REMOVING;
 
-       usb_otg_set_host(&dev->dev, hcd, 0);
-
        usb_remove_hcd(xhci->shared_hcd);
        usb_phy_shutdown(hcd->usb_phy);
 
+       usb_otg_set_host(&dev->dev, hcd, false);
+
        usb_remove_hcd(hcd);
        usb_put_hcd(xhci->shared_hcd);