diff options
| author | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
|---|---|---|
| committer | Dmitry Torokhov <[email protected]> | 2023-08-30 16:06:38 -0700 | 
| commit | 1ac731c529cd4d6adbce134754b51ff7d822b145 (patch) | |
| tree | 143ab3f35ca5f3b69f583c84e6964b17139c2ec1 /drivers/soundwire/generic_bandwidth_allocation.c | |
| parent | 07b4c950f27bef0362dc6ad7ee713aab61d58149 (diff) | |
| parent | 54116d442e001e1b6bd482122043b1870998a1f3 (diff) | |
Merge branch 'next' into for-linus
Prepare input updates for 6.6 merge window.
Diffstat (limited to 'drivers/soundwire/generic_bandwidth_allocation.c')
| -rw-r--r-- | drivers/soundwire/generic_bandwidth_allocation.c | 15 | 
1 files changed, 5 insertions, 10 deletions
diff --git a/drivers/soundwire/generic_bandwidth_allocation.c b/drivers/soundwire/generic_bandwidth_allocation.c index f7c66083a4dd..325c475b6a66 100644 --- a/drivers/soundwire/generic_bandwidth_allocation.c +++ b/drivers/soundwire/generic_bandwidth_allocation.c @@ -6,6 +6,7 @@   *   */ +#include <linux/bitops.h>  #include <linux/device.h>  #include <linux/module.h>  #include <linux/mod_devicetable.h> @@ -28,15 +29,8 @@ struct sdw_group {  	unsigned int *rates;  }; -struct sdw_transport_data { -	int hstart; -	int hstop; -	int block_offset; -	int sub_block_offset; -}; - -static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt, -				    struct sdw_transport_data *t_data) +void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt, +			     struct sdw_transport_data *t_data)  {  	struct sdw_slave_runtime *s_rt = NULL;  	struct sdw_port_runtime *p_rt; @@ -54,7 +48,7 @@ static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,  		slave_total_ch = 0;  		list_for_each_entry(p_rt, &s_rt->port_list, port_node) { -			ch = sdw_ch_mask_to_ch(p_rt->ch_mask); +			ch = hweight32(p_rt->ch_mask);  			sdw_fill_xport_params(&p_rt->transport_params,  					      p_rt->num, false, @@ -85,6 +79,7 @@ static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,  		}  	}  } +EXPORT_SYMBOL(sdw_compute_slave_ports);  static void sdw_compute_master_ports(struct sdw_master_runtime *m_rt,  				     struct sdw_group_params *params,  |