diff options
author | Christian Gromm | 2019-04-03 15:19:52 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2019-04-16 13:25:18 +0200 |
commit | acdbb89753734ff8e3fe7cab97d6898d23ff8ed8 (patch) | |
tree | 07b20abb4fa52def857704ed0aeaf3f4c839d125 /drivers/staging/most/sound/sound.c | |
parent | staging: most: core: remove attribute add_link (diff) | |
download | kernel-qcow2-linux-acdbb89753734ff8e3fe7cab97d6898d23ff8ed8.tar.gz kernel-qcow2-linux-acdbb89753734ff8e3fe7cab97d6898d23ff8ed8.tar.xz kernel-qcow2-linux-acdbb89753734ff8e3fe7cab97d6898d23ff8ed8.zip |
staging: most: allow speculative configuration
This patch makes the driver accept a link configuration eventhough no
device is attached to the bus. Instead the configuration is being applied
as soon as a device is being registered with the core.
Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/most/sound/sound.c')
-rw-r--r-- | drivers/staging/most/sound/sound.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c index 6b5438c2495b..7c998673a6f8 100644 --- a/drivers/staging/most/sound/sound.c +++ b/drivers/staging/most/sound/sound.c @@ -20,6 +20,7 @@ #include <most/core.h> #define DRIVER_NAME "sound" +#define STRING_SIZE 80 static struct core_component comp; @@ -582,6 +583,7 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, int direction; u16 ch_num; char *sample_res; + char arg_list_cpy[STRING_SIZE]; if (!iface) return -EINVAL; @@ -590,8 +592,8 @@ static int audio_probe_channel(struct most_interface *iface, int channel_id, pr_err("Incompatible channel type\n"); return -EINVAL; } - - ret = split_arg_list(arg_list, &ch_num, &sample_res); + strlcpy(arg_list_cpy, arg_list, STRING_SIZE); + ret = split_arg_list(arg_list_cpy, &ch_num, &sample_res); if (ret < 0) return ret; |