Skip to content

Commit

Permalink
Revert "soundwire: stream: fix programming slave ports for non-contin…
Browse files Browse the repository at this point in the history
…ous port maps"

This reverts commit ab8d66d.
  • Loading branch information
bardliao committed Sep 12, 2024
1 parent c3b8755 commit 988b5c7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/soundwire/stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -1301,18 +1301,18 @@ struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave,
unsigned int port_num)
{
struct sdw_dpn_prop *dpn_prop;
unsigned long mask;
u8 num_ports;
int i;

if (direction == SDW_DATA_DIR_TX) {
mask = slave->prop.source_ports;
num_ports = hweight32(slave->prop.source_ports);
dpn_prop = slave->prop.src_dpn_prop;
} else {
mask = slave->prop.sink_ports;
num_ports = hweight32(slave->prop.sink_ports);
dpn_prop = slave->prop.sink_dpn_prop;
}

for_each_set_bit(i, &mask, 32) {
for (i = 0; i < num_ports; i++) {
if (dpn_prop[i].num == port_num)
return &dpn_prop[i];
}
Expand Down

0 comments on commit 988b5c7

Please sign in to comment.