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

Commit e1e97b30 authored by Konstantein Dorfman's avatar Konstantein Dorfman Committed by Matt Wagantall
Browse files

mmc: sdhci-msm: move pwr_irq to sdhci_msm_host



Keep pwr_irq as field in sdhci_msm_host struct instead of local
sdhci_msm_probe variable. It will be used later in power management
callbacks.

Change-Id: I7b3629b958e953bab66c32e6131b7fd577c7c9f2
Signed-off-by: default avatarKonstantin Dorfman <kdorfman@codeaurora.org>
parent 4ae31405
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -294,6 +294,7 @@ struct sdhci_msm_bus_vote {
struct sdhci_msm_host {
	struct platform_device	*pdev;
	void __iomem *core_mem;    /* MSM SDCC mapped address */
	int	pwr_irq;	/* power irq */
	struct clk	 *clk;     /* main SD/MMC bus clock */
	struct clk	 *pclk;    /* SDHC peripheral bus clock */
	struct clk	 *bus_clk; /* SDHC bus voter clock */
@@ -2879,7 +2880,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
	struct sdhci_pltfm_host *pltfm_host;
	struct sdhci_msm_host *msm_host;
	struct resource *core_memres = NULL;
	int ret = 0, pwr_irq = 0, dead = 0;
	int ret = 0, dead = 0;
	u16 host_version;
	u32 pwr, irq_status, irq_ctl;

@@ -3108,18 +3109,18 @@ static int sdhci_msm_probe(struct platform_device *pdev)
	host->quirks2 |= SDHCI_QUIRK2_ADMA_SKIP_DATA_ALIGNMENT;

	/* Setup PWRCTL irq */
	pwr_irq = platform_get_irq_byname(pdev, "pwr_irq");
	if (pwr_irq < 0) {
	msm_host->pwr_irq = platform_get_irq_byname(pdev, "pwr_irq");
	if (msm_host->pwr_irq < 0) {
		dev_err(&pdev->dev, "Failed to get pwr_irq by name (%d)\n",
				pwr_irq);
				msm_host->pwr_irq);
		goto vreg_deinit;
	}
	ret = devm_request_threaded_irq(&pdev->dev, pwr_irq, NULL,
	ret = devm_request_threaded_irq(&pdev->dev, msm_host->pwr_irq, NULL,
					sdhci_msm_pwr_irq, IRQF_ONESHOT,
					dev_name(&pdev->dev), host);
	if (ret) {
		dev_err(&pdev->dev, "Request threaded irq(%d) failed (%d)\n",
				pwr_irq, ret);
				msm_host->pwr_irq, ret);
		goto vreg_deinit;
	}