mirror of https://github.com/thesofproject/sof.git
byt: hsw: ssp: move spinlock init to earlier stage
Moves spinlock initialization for byt and hsw platforms to earlier stage. Otherwise the output will be undefined, since we are using the spinlock before initializing it in platform_init sequence. Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
parent
9a6616a89b
commit
2ee7a24f97
|
@ -608,8 +608,6 @@ static int ssp_probe(struct dai *dai)
|
|||
sizeof(*ssp));
|
||||
dai_set_drvdata(dai, ssp);
|
||||
|
||||
spinlock_init(&dai->lock);
|
||||
|
||||
ssp->state[DAI_DIR_PLAYBACK] = COMP_STATE_READY;
|
||||
ssp->state[DAI_DIR_CAPTURE] = COMP_STATE_READY;
|
||||
|
||||
|
|
|
@ -517,8 +517,6 @@ static int ssp_probe(struct dai *dai)
|
|||
sizeof(*ssp));
|
||||
dai_set_drvdata(dai, ssp);
|
||||
|
||||
spinlock_init(&dai->lock);
|
||||
|
||||
ssp->state[DAI_DIR_PLAYBACK] = COMP_STATE_READY;
|
||||
ssp->state[DAI_DIR_CAPTURE] = COMP_STATE_READY;
|
||||
|
||||
|
|
|
@ -125,6 +125,12 @@ static struct dai_type_info dti[] = {
|
|||
|
||||
int dai_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* initialize spin locks early to enable ref counting */
|
||||
for (i = 0; i < ARRAY_SIZE(ssp); i++)
|
||||
spinlock_init(&ssp[i].lock);
|
||||
|
||||
dai_install(dti, ARRAY_SIZE(dti));
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -57,6 +57,12 @@ static struct dai_type_info dti[] = {
|
|||
|
||||
int dai_init(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
/* initialize spin locks early to enable ref counting */
|
||||
for (i = 0; i < ARRAY_SIZE(ssp); i++)
|
||||
spinlock_init(&ssp[i].lock);
|
||||
|
||||
dai_install(dti, ARRAY_SIZE(dti));
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue