diff options
author | Christian Gromm <christian.gromm@microchip.com> | 2018-12-17 15:10:14 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-12-17 16:10:20 +0100 |
commit | 4c6375dc1c03a5097cb9f3575a441c15b270e397 (patch) | |
tree | 637e7661eddce8441dd42d0c665a686f1bb1af33 /drivers/staging/most/sound | |
parent | ba99c631810bd9aef2fc7e62420d77371d2d04f5 (diff) |
staging: most: sound: rename variable
Since the channels of a MOST device are now being represented as
individual PCM devices of one sound card, the variable card_name is not
suitable anymore to describe them. Therefore, this patch renames the
variable to device_name.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/sound')
-rw-r--r-- | drivers/staging/most/sound/sound.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c index 0e9377f96b63..6a453d7e65cd 100644 --- a/drivers/staging/most/sound/sound.c +++ b/drivers/staging/most/sound/sound.c @@ -471,14 +471,14 @@ static const struct snd_pcm_ops pcm_ops = { .page = snd_pcm_lib_get_vmalloc_page, }; -static int split_arg_list(char *buf, char **card_name, u16 *ch_num, +static int split_arg_list(char *buf, char **device_name, u16 *ch_num, char **sample_res, u8 *create) { char *num; int ret; - *card_name = strsep(&buf, "."); - if (!*card_name) { + *device_name = strsep(&buf, "."); + if (!*device_name) { pr_err("Missing sound card name\n"); return -EIO; } @@ -588,7 +588,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, int capture_count = 0; int ret; int direction; - char *card_name; + char *device_name; u16 ch_num; u8 create = 0; char *sample_res; @@ -601,7 +601,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, return -EINVAL; } - ret = split_arg_list(arg_list, &card_name, &ch_num, &sample_res, + ret = split_arg_list(arg_list, &device_name, &ch_num, &sample_res, &create); if (ret < 0) return ret; @@ -622,7 +622,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, INIT_LIST_HEAD(&adpt->dev_list); iface->priv = adpt; list_add_tail(&adpt->list, &adpt_list); - ret = snd_card_new(&iface->dev, -1, card_name, THIS_MODULE, + ret = snd_card_new(&iface->dev, -1, device_name, THIS_MODULE, sizeof(*channel), &adpt->card); if (ret < 0) goto err_free_adpt; @@ -664,14 +664,14 @@ skip_adpt_alloc: if (ret) goto err_free_adpt; - ret = snd_pcm_new(adpt->card, card_name, adpt->pcm_dev_idx, + ret = snd_pcm_new(adpt->card, device_name, adpt->pcm_dev_idx, playback_count, capture_count, &pcm); if (ret < 0) goto err_free_adpt; pcm->private_data = channel; - snprintf(pcm->name, sizeof(pcm->name), card_name); + snprintf(pcm->name, sizeof(pcm->name), device_name); snd_pcm_set_ops(pcm, direction, &pcm_ops); if (create) { |