Skip to content

Commit 1136ced

Browse files
committed
Merge tag 'soundwire-6.11-fixes_2' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire fix from Vinod Koul: - Revert of earlier fix sent for non-continuous port map programming which caused regression on Intel platforms * tag 'soundwire-6.11-fixes_2' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire: soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps"
2 parents 46040ea + 233a95f commit 1136ced

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/soundwire/stream.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,18 +1291,18 @@ struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave,
12911291
unsigned int port_num)
12921292
{
12931293
struct sdw_dpn_prop *dpn_prop;
1294-
unsigned long mask;
1294+
u8 num_ports;
12951295
int i;
12961296

12971297
if (direction == SDW_DATA_DIR_TX) {
1298-
mask = slave->prop.source_ports;
1298+
num_ports = hweight32(slave->prop.source_ports);
12991299
dpn_prop = slave->prop.src_dpn_prop;
13001300
} else {
1301-
mask = slave->prop.sink_ports;
1301+
num_ports = hweight32(slave->prop.sink_ports);
13021302
dpn_prop = slave->prop.sink_dpn_prop;
13031303
}
13041304

1305-
for_each_set_bit(i, &mask, 32) {
1305+
for (i = 0; i < num_ports; i++) {
13061306
if (dpn_prop[i].num == port_num)
13071307
return &dpn_prop[i];
13081308
}

0 commit comments

Comments
 (0)