diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 24f3cac7879f..4930d9f09d7f 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3181,6 +3181,8 @@ struct sdhci_host *sdhci_alloc_host(struct device *dev, host = mmc_priv(mmc); host->mmc = mmc; + spin_lock_init(&host->lock); + return host; } @@ -3622,8 +3624,6 @@ int sdhci_add_host(struct sdhci_host *host) return -ENODEV; } - spin_lock_init(&host->lock); - /* * Maximum number of segments. Depends on if the hardware * can do scatter/gather or not.