Skip to content

Commit f346fdf

Browse files
vijendarmukundavinodkoul
authored andcommitted
soundwire: export sdw_compute_slave_ports() function
Export sdw_compute_slave_ports() function to use it in another soundwire manager module. Move sdw_transport_data structure to bus header file to export sdw_compute_slave_ports() function. Signed-off-by: Vijendar Mukunda <Vijendar.Mukunda@amd.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/lkml/20230201165944.3169125-1-Vijendar.Mukunda@amd.com Link: https://lore.kernel.org/r/20230321050901.115439-2-Vijendar.Mukunda@amd.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent acdae46 commit f346fdf

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

drivers/soundwire/bus.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,13 @@ struct sdw_master_runtime {
144144
struct list_head bus_node;
145145
};
146146

147+
struct sdw_transport_data {
148+
int hstart;
149+
int hstop;
150+
int block_offset;
151+
int sub_block_offset;
152+
};
153+
147154
struct sdw_dpn_prop *sdw_get_slave_dpn_prop(struct sdw_slave *slave,
148155
enum sdw_data_direction direction,
149156
unsigned int port_num);
@@ -201,5 +208,7 @@ int sdw_bwrite_no_pm_unlocked(struct sdw_bus *bus, u16 dev_num, u32 addr, u8 val
201208

202209
void sdw_clear_slave_status(struct sdw_bus *bus, u32 request);
203210
int sdw_slave_modalias(const struct sdw_slave *slave, char *buf, size_t size);
211+
void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,
212+
struct sdw_transport_data *t_data);
204213

205214
#endif /* __SDW_BUS_H */

drivers/soundwire/generic_bandwidth_allocation.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,8 @@ struct sdw_group {
2929
unsigned int *rates;
3030
};
3131

32-
struct sdw_transport_data {
33-
int hstart;
34-
int hstop;
35-
int block_offset;
36-
int sub_block_offset;
37-
};
38-
39-
static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,
40-
struct sdw_transport_data *t_data)
32+
void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,
33+
struct sdw_transport_data *t_data)
4134
{
4235
struct sdw_slave_runtime *s_rt = NULL;
4336
struct sdw_port_runtime *p_rt;
@@ -86,6 +79,7 @@ static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt,
8679
}
8780
}
8881
}
82+
EXPORT_SYMBOL(sdw_compute_slave_ports);
8983

9084
static void sdw_compute_master_ports(struct sdw_master_runtime *m_rt,
9185
struct sdw_group_params *params,

0 commit comments

Comments
 (0)