diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-08-31 06:15:02 +1200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-08-31 06:15:02 +1200 |
commit | 8d80c9903e3f6f9a99e8fd4374c2cf0745d0b708 (patch) | |
tree | 392e0bd6eac52f7cc1bb44edcc36a9e0630ca4dd /drivers | |
parent | 13c6bba601ac2928e330e14e178c7ebfabb19392 (diff) | |
parent | ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 (diff) |
Merge tag 'soundwire-6.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire
Pull soundwire fix from Vinod Koul:
- Single fix for non-continous port map programming
* tag 'soundwire-6.11-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire:
soundwire: stream: fix programming slave ports for non-continous port maps
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/soundwire/stream.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 7aa4900dcf31..f275143d7b18 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -1291,18 +1291,18 @@ struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave, unsigned int port_num) { struct sdw_dpn_prop *dpn_prop; - u8 num_ports; + unsigned long mask; int i; if (direction == SDW_DATA_DIR_TX) { - num_ports = hweight32(slave->prop.source_ports); + mask = slave->prop.source_ports; dpn_prop = slave->prop.src_dpn_prop; } else { - num_ports = hweight32(slave->prop.sink_ports); + mask = slave->prop.sink_ports; dpn_prop = slave->prop.sink_dpn_prop; } - for (i = 0; i < num_ports; i++) { + for_each_set_bit(i, &mask, 32) { if (dpn_prop[i].num == port_num) return &dpn_prop[i]; } |