diff options
author | Mark Brown <broonie@linaro.org> | 2013-11-20 10:20:31 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-20 10:20:31 -0500 |
commit | cde4d7596c838e073ad0f1f9bd04e7ac01778d34 (patch) | |
tree | ccd4625f03507b02c8ac23bb173249eb4df5a6da /sound/soc/codecs/ab8500-codec.c | |
parent | 971a6f45e071447975c33d6747f95a1e385d0f45 (diff) | |
parent | fc7dc61d9a87011aaf8a6eb3144ebf9552adf5d2 (diff) |
Merge remote-tracking branch 'asoc/fix/fsl' into asoc-linus
Diffstat (limited to 'sound/soc/codecs/ab8500-codec.c')
-rw-r--r-- | sound/soc/codecs/ab8500-codec.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 79902179c657..1ad92cbf0b24 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c | |||
@@ -2312,17 +2312,17 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai, | |||
2312 | case 0: | 2312 | case 0: |
2313 | break; | 2313 | break; |
2314 | case 1: | 2314 | case 1: |
2315 | slot = find_first_bit((unsigned long *)&tx_mask, 32); | 2315 | slot = ffs(tx_mask); |
2316 | snd_soc_update_bits(codec, AB8500_DASLOTCONF1, mask, slot); | 2316 | snd_soc_update_bits(codec, AB8500_DASLOTCONF1, mask, slot); |
2317 | snd_soc_update_bits(codec, AB8500_DASLOTCONF3, mask, slot); | 2317 | snd_soc_update_bits(codec, AB8500_DASLOTCONF3, mask, slot); |
2318 | snd_soc_update_bits(codec, AB8500_DASLOTCONF2, mask, slot); | 2318 | snd_soc_update_bits(codec, AB8500_DASLOTCONF2, mask, slot); |
2319 | snd_soc_update_bits(codec, AB8500_DASLOTCONF4, mask, slot); | 2319 | snd_soc_update_bits(codec, AB8500_DASLOTCONF4, mask, slot); |
2320 | break; | 2320 | break; |
2321 | case 2: | 2321 | case 2: |
2322 | slot = find_first_bit((unsigned long *)&tx_mask, 32); | 2322 | slot = ffs(tx_mask); |
2323 | snd_soc_update_bits(codec, AB8500_DASLOTCONF1, mask, slot); | 2323 | snd_soc_update_bits(codec, AB8500_DASLOTCONF1, mask, slot); |
2324 | snd_soc_update_bits(codec, AB8500_DASLOTCONF3, mask, slot); | 2324 | snd_soc_update_bits(codec, AB8500_DASLOTCONF3, mask, slot); |
2325 | slot = find_next_bit((unsigned long *)&tx_mask, 32, slot + 1); | 2325 | slot = fls(tx_mask); |
2326 | snd_soc_update_bits(codec, AB8500_DASLOTCONF2, mask, slot); | 2326 | snd_soc_update_bits(codec, AB8500_DASLOTCONF2, mask, slot); |
2327 | snd_soc_update_bits(codec, AB8500_DASLOTCONF4, mask, slot); | 2327 | snd_soc_update_bits(codec, AB8500_DASLOTCONF4, mask, slot); |
2328 | break; | 2328 | break; |
@@ -2353,18 +2353,18 @@ static int ab8500_codec_set_dai_tdm_slot(struct snd_soc_dai *dai, | |||
2353 | case 0: | 2353 | case 0: |
2354 | break; | 2354 | break; |
2355 | case 1: | 2355 | case 1: |
2356 | slot = find_first_bit((unsigned long *)&rx_mask, 32); | 2356 | slot = ffs(rx_mask); |
2357 | snd_soc_update_bits(codec, AB8500_ADSLOTSEL(slot), | 2357 | snd_soc_update_bits(codec, AB8500_ADSLOTSEL(slot), |
2358 | AB8500_MASK_SLOT(slot), | 2358 | AB8500_MASK_SLOT(slot), |
2359 | AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(AB8500_AD_OUT3, slot)); | 2359 | AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(AB8500_AD_OUT3, slot)); |
2360 | break; | 2360 | break; |
2361 | case 2: | 2361 | case 2: |
2362 | slot = find_first_bit((unsigned long *)&rx_mask, 32); | 2362 | slot = ffs(rx_mask); |
2363 | snd_soc_update_bits(codec, | 2363 | snd_soc_update_bits(codec, |
2364 | AB8500_ADSLOTSEL(slot), | 2364 | AB8500_ADSLOTSEL(slot), |
2365 | AB8500_MASK_SLOT(slot), | 2365 | AB8500_MASK_SLOT(slot), |
2366 | AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(AB8500_AD_OUT3, slot)); | 2366 | AB8500_ADSLOTSELX_AD_OUT_TO_SLOT(AB8500_AD_OUT3, slot)); |
2367 | slot = find_next_bit((unsigned long *)&rx_mask, 32, slot + 1); | 2367 | slot = fls(rx_mask); |
2368 | snd_soc_update_bits(codec, | 2368 | snd_soc_update_bits(codec, |
2369 | AB8500_ADSLOTSEL(slot), | 2369 | AB8500_ADSLOTSEL(slot), |
2370 | AB8500_MASK_SLOT(slot), | 2370 | AB8500_MASK_SLOT(slot), |
@@ -2586,6 +2586,8 @@ static int ab8500_codec_driver_probe(struct platform_device *pdev) | |||
2586 | /* Create driver private-data struct */ | 2586 | /* Create driver private-data struct */ |
2587 | drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata), | 2587 | drvdata = devm_kzalloc(&pdev->dev, sizeof(struct ab8500_codec_drvdata), |
2588 | GFP_KERNEL); | 2588 | GFP_KERNEL); |
2589 | if (!drvdata) | ||
2590 | return -ENOMEM; | ||
2589 | drvdata->sid_status = SID_UNCONFIGURED; | 2591 | drvdata->sid_status = SID_UNCONFIGURED; |
2590 | drvdata->anc_status = ANC_UNCONFIGURED; | 2592 | drvdata->anc_status = ANC_UNCONFIGURED; |
2591 | dev_set_drvdata(&pdev->dev, drvdata); | 2593 | dev_set_drvdata(&pdev->dev, drvdata); |