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

Commit b8332312 authored by Tarun Gupta's avatar Tarun Gupta
Browse files

USB: UICC: set bus->skip_resume to true for UICC drivers



As UICC devices are always present on the device, we want to avoid
unnecessary resume during system_resume even if we do not intend to do
UICC data transfers. Also setting skip_resume helps to avoid race seen
due to following sequence of events runtime_suspend, system_suspend (in
progress), runtime resume (started). Set bus->skip_resume to true for UICC
drivers to simplify suspend and resume sequences.

Change-Id: I330c189598679278dfeb2e8284bdd2b6ac050efe
Signed-off-by: default avatarTarun Gupta <tarung@codeaurora.org>
parent 3511ae2a
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -372,6 +372,8 @@ static int ehci_msm_uicc_probe(struct platform_device *pdev)
		goto disable_clk_bus;
		goto disable_clk_bus;
	}
	}


	hcd_to_bus(hcd)->skip_resume = true;

	/*
	/*
	 * We manage the clocks and gpio as part of
	 * We manage the clocks and gpio as part of
	 * the root hub PM. The platform driver runtime
	 * the root hub PM. The platform driver runtime
+1 −0
Original line number Original line Diff line number Diff line
@@ -2369,6 +2369,7 @@ static int ice40_spi_probe(struct spi_device *spi)
	}
	}
	*((struct ice40_hcd **) ihcd->hcd->hcd_priv) = ihcd;
	*((struct ice40_hcd **) ihcd->hcd->hcd_priv) = ihcd;


	hcd_to_bus(ihcd->hcd)->skip_resume = true;
	ret = usb_add_hcd(ihcd->hcd, 0, 0);
	ret = usb_add_hcd(ihcd->hcd, 0, 0);


	if (ret < 0) {
	if (ret < 0) {