staging: most: change signature of function probe_channel

This patch adds the param argument to the function parameter of
the call-back probe_channel. This parameter is needed to configure
the channels of an attached device.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Christian Gromm 2019-04-03 15:19:45 +02:00 committed by Greg Kroah-Hartman
parent 2bfde34887
commit dfee92dd50
6 changed files with 12 additions and 8 deletions

View File

@ -425,7 +425,7 @@ static int comp_tx_completion(struct most_interface *iface, int channel_id)
* Returns 0 on success or error code otherwise.
*/
static int comp_probe(struct most_interface *iface, int channel_id,
struct most_channel_config *cfg, char *name)
struct most_channel_config *cfg, char *name, char *args)
{
struct comp_channel *c;
unsigned long cl_flags;

View File

@ -701,6 +701,7 @@ static struct most_channel *get_channel(char *mdev, char *mdev_ch)
static
inline int link_channel_to_component(struct most_channel *c,
struct core_component *comp,
char *name,
char *comp_param)
{
int ret;
@ -714,7 +715,8 @@ inline int link_channel_to_component(struct most_channel *c,
return -ENOSPC;
*comp_ptr = comp;
ret = comp->probe_channel(c->iface, c->channel_id, &c->cfg, comp_param);
ret = comp->probe_channel(c->iface, c->channel_id, &c->cfg, name,
comp_param);
if (ret) {
*comp_ptr = NULL;
return ret;
@ -775,7 +777,7 @@ static ssize_t add_link_store(struct device_driver *drv,
if (!c)
return -ENODEV;
ret = link_channel_to_component(c, comp, comp_param);
ret = link_channel_to_component(c, comp, "name", comp_param);
if (ret)
return ret;
return len;

View File

@ -266,7 +266,8 @@ struct core_component {
struct list_head list;
const char *name;
int (*probe_channel)(struct most_interface *iface, int channel_idx,
struct most_channel_config *cfg, char *name);
struct most_channel_config *cfg, char *name,
char *param);
int (*disconnect_channel)(struct most_interface *iface,
int channel_idx);
int (*rx_completion)(struct mbo *mbo);

View File

@ -293,7 +293,8 @@ static struct net_dev_context *get_net_dev_hold(struct most_interface *iface)
}
static int comp_probe_channel(struct most_interface *iface, int channel_idx,
struct most_channel_config *ccfg, char *name)
struct most_channel_config *ccfg, char *name,
char *args)
{
struct net_dev_context *nd;
struct net_dev_channel *ch;

View File

@ -579,7 +579,7 @@ static void release_adapter(struct sound_adapter *adpt)
*/
static int audio_probe_channel(struct most_interface *iface, int channel_id,
struct most_channel_config *cfg,
char *arg_list)
char *device_name, char *arg_list)
{
struct channel *channel;
struct sound_adapter *adpt;
@ -588,7 +588,6 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id,
int capture_count = 0;
int ret;
int direction;
char *device_name;
u16 ch_num;
u8 create = 0;
char *sample_res;

View File

@ -453,7 +453,8 @@ static void comp_v4l2_dev_release(struct v4l2_device *v4l2_dev)
}
static int comp_probe_channel(struct most_interface *iface, int channel_idx,
struct most_channel_config *ccfg, char *name)
struct most_channel_config *ccfg, char *name,
char *args)
{
int ret;
struct most_video_dev *mdev = get_comp_dev(iface, channel_idx);