Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dfee92dd authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman
Browse files

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: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2bfde348
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
+4 −2
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -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);
+2 −1
Original line number Diff line number Diff line
@@ -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;
+1 −2
Original line number Diff line number Diff line
@@ -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;
Loading