summaryrefslogtreecommitdiffstats
path: root/core.c
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-31 18:41:33 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-10-31 18:41:33 +1100
commit0765c6c497379a9f850d15be3b3cbdaba59fe7fc (patch)
tree9059ea9d2e62080e4a55f8f30868d6f72485e5f8 /core.c
parent80973a617ada9181a40a69e25b7f23e7c02bc545 (diff)
Remove coreinfo, absorb version info into core
Since coreinfo only has version info, and this is not being used at all, we can absorb the version info into the private avirt_core structure. We could in future implement a function to retrieve the version, when, and if, it is required. Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'core.c')
-rw-r--r--core.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/core.c b/core.c
index aacc0a1..827ee5c 100644
--- a/core.c
+++ b/core.c
@@ -28,14 +28,11 @@ MODULE_LICENSE("GPL v2");
#define SND_AVIRTUAL_DRIVER "snd_avirt"
static struct snd_avirt_core core = {
+ .version = { 0, 0, 1 },
.stream_count = 0,
.streams_sealed = false,
};
-struct snd_avirt_coreinfo coreinfo = {
- .version = { 0, 0, 1 },
-};
-
static LIST_HEAD(audiopath_list);
struct snd_avirt_audiopath_obj {
@@ -256,11 +253,9 @@ struct snd_avirt_audiopath *snd_avirt_audiopath_get(const char *uid)
/**
* snd_avirt_audiopath_register - register Audio Path with AVIRT
* @audiopath: Audio Path to be registered
- * @core: ALSA virtual driver core info
* @return: 0 on success or error code otherwise
*/
-int snd_avirt_audiopath_register(struct snd_avirt_audiopath *audiopath,
- struct snd_avirt_coreinfo **info)
+int snd_avirt_audiopath_register(struct snd_avirt_audiopath *audiopath)
{
struct snd_avirt_audiopath_obj *audiopath_obj;
@@ -451,8 +446,8 @@ static int __init core_init(void)
{
int err;
- D_INFOK("Alsa Virtual Sound Driver avirt-%d.%d.%d", coreinfo.version[0],
- coreinfo.version[1], coreinfo.version[2]);
+ D_INFOK("Alsa Virtual Sound Driver avirt-%d.%d.%d", core.version[0],
+ core.version[1], core.version[2]);
core.avirt_class = class_create(THIS_MODULE, SND_AVIRTUAL_DRIVER);
if (IS_ERR(core.avirt_class)) {