ASoC: Intel: sof_sdw: Use for_each_set_bit
Rather than open coding a loop to process each bit use for_each_set_bit. Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com> Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://msgid.link/r/20240326160429.13560-10-pierre-louis.bossart@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
c577b747b9
commit
2132dbc1a9
@ -5,6 +5,7 @@
|
||||
* sof_sdw - ASOC Machine driver for Intel SoundWire platforms
|
||||
*/
|
||||
|
||||
#include <linux/bitmap.h>
|
||||
#include <linux/device.h>
|
||||
#include <linux/dmi.h>
|
||||
#include <linux/module.h>
|
||||
@ -1644,7 +1645,7 @@ static int sof_card_dai_links_create(struct snd_soc_card *card)
|
||||
char *codec_name, *codec_dai_name;
|
||||
int i, j, be_id = 0;
|
||||
int hdmi_num;
|
||||
int ssp_mask;
|
||||
unsigned long ssp_mask;
|
||||
int ret;
|
||||
|
||||
ret = get_dailink_info(dev, adr_link, &sdw_be_num, &codec_conf_num);
|
||||
@ -1782,12 +1783,10 @@ SSP:
|
||||
if (!ssp_num)
|
||||
goto DMIC;
|
||||
|
||||
for (i = 0, j = 0; ssp_mask; i++, ssp_mask >>= 1) {
|
||||
j = 0;
|
||||
for_each_set_bit(i, &ssp_mask, BITS_PER_TYPE(ssp_mask)) {
|
||||
int playback, capture;
|
||||
|
||||
if (!(ssp_mask & 0x1))
|
||||
continue;
|
||||
|
||||
name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d-Codec", i);
|
||||
cpu_dai_name = devm_kasprintf(dev, GFP_KERNEL, "SSP%d Pin", i);
|
||||
codec_name = devm_kasprintf(dev, GFP_KERNEL, "i2c-%s:0%d",
|
||||
|
Loading…
x
Reference in New Issue
Block a user