Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a8146aa authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Felipe Balbi
Browse files

usb: dwc2: gadget: disable phy before turning off power regulators



This patch fixes probe function to match the pattern used elsewhere in
the driver, where power regulators are turned off as the last element in
the device shutdown procedure.

Acked-by: default avatarPaul Zimmerman <paulz@synopsys.com>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent d12a8727
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -3568,6 +3568,7 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
		s3c_hsotg_initep(hsotg, &hsotg->eps[epnum], epnum);

	/* disable power and clock */
	s3c_hsotg_phy_disable(hsotg);

	ret = regulator_bulk_disable(ARRAY_SIZE(hsotg->supplies),
				    hsotg->supplies);
@@ -3576,8 +3577,6 @@ static int s3c_hsotg_probe(struct platform_device *pdev)
		goto err_ep_mem;
	}

	s3c_hsotg_phy_disable(hsotg);

	ret = usb_add_gadget_udc(&pdev->dev, &hsotg->gadget);
	if (ret)
		goto err_ep_mem;