mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-24 02:18:18 +07:00
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:
parent
2bfde34887
commit
dfee92dd50
@ -425,7 +425,7 @@ static int comp_tx_completion(struct most_interface *iface, int channel_id)
|
|||||||
* Returns 0 on success or error code otherwise.
|
* Returns 0 on success or error code otherwise.
|
||||||
*/
|
*/
|
||||||
static int comp_probe(struct most_interface *iface, int channel_id,
|
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;
|
struct comp_channel *c;
|
||||||
unsigned long cl_flags;
|
unsigned long cl_flags;
|
||||||
|
@ -701,6 +701,7 @@ static struct most_channel *get_channel(char *mdev, char *mdev_ch)
|
|||||||
static
|
static
|
||||||
inline int link_channel_to_component(struct most_channel *c,
|
inline int link_channel_to_component(struct most_channel *c,
|
||||||
struct core_component *comp,
|
struct core_component *comp,
|
||||||
|
char *name,
|
||||||
char *comp_param)
|
char *comp_param)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
@ -714,7 +715,8 @@ inline int link_channel_to_component(struct most_channel *c,
|
|||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
|
|
||||||
*comp_ptr = comp;
|
*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) {
|
if (ret) {
|
||||||
*comp_ptr = NULL;
|
*comp_ptr = NULL;
|
||||||
return ret;
|
return ret;
|
||||||
@ -775,7 +777,7 @@ static ssize_t add_link_store(struct device_driver *drv,
|
|||||||
if (!c)
|
if (!c)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
ret = link_channel_to_component(c, comp, comp_param);
|
ret = link_channel_to_component(c, comp, "name", comp_param);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
return len;
|
return len;
|
||||||
|
@ -266,7 +266,8 @@ struct core_component {
|
|||||||
struct list_head list;
|
struct list_head list;
|
||||||
const char *name;
|
const char *name;
|
||||||
int (*probe_channel)(struct most_interface *iface, int channel_idx,
|
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 (*disconnect_channel)(struct most_interface *iface,
|
||||||
int channel_idx);
|
int channel_idx);
|
||||||
int (*rx_completion)(struct mbo *mbo);
|
int (*rx_completion)(struct mbo *mbo);
|
||||||
|
@ -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,
|
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_context *nd;
|
||||||
struct net_dev_channel *ch;
|
struct net_dev_channel *ch;
|
||||||
|
@ -579,7 +579,7 @@ static void release_adapter(struct sound_adapter *adpt)
|
|||||||
*/
|
*/
|
||||||
static int audio_probe_channel(struct most_interface *iface, int channel_id,
|
static int audio_probe_channel(struct most_interface *iface, int channel_id,
|
||||||
struct most_channel_config *cfg,
|
struct most_channel_config *cfg,
|
||||||
char *arg_list)
|
char *device_name, char *arg_list)
|
||||||
{
|
{
|
||||||
struct channel *channel;
|
struct channel *channel;
|
||||||
struct sound_adapter *adpt;
|
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 capture_count = 0;
|
||||||
int ret;
|
int ret;
|
||||||
int direction;
|
int direction;
|
||||||
char *device_name;
|
|
||||||
u16 ch_num;
|
u16 ch_num;
|
||||||
u8 create = 0;
|
u8 create = 0;
|
||||||
char *sample_res;
|
char *sample_res;
|
||||||
|
@ -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,
|
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;
|
int ret;
|
||||||
struct most_video_dev *mdev = get_comp_dev(iface, channel_idx);
|
struct most_video_dev *mdev = get_comp_dev(iface, channel_idx);
|
||||||
|
Loading…
Reference in New Issue
Block a user