mmc: sdhci: initialize sdhci_host lock in sdhci_alloc_host()
Currently, the sdhci host lock is initialized in sdhci_add_host() but there can be a case where it is required even before that. Hence, initialize it in sdhci_alloc_host() where sdhci_host structure is allocated. Change-Id: If99d82679c07bc2d36e0aad9354757288aa400b8 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
This commit is contained in:
parent
a45d072d68
commit
f9359ba80e
1 changed files with 2 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue