aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-02 14:41:06 +1100
committerMark Farrugia <mark.farrugia@fiberdyne.com.au>2018-11-02 14:42:10 +1100
commitae62015391dded62bf60ac0cc8b3e19fef50dbbc (patch)
tree8b7c6c983e98b6f9509dfc92838f7c2bb699f211
parent52db7a23a234080d3a28dfe60191c239cc04613b (diff)
Refactor some variables for better readability
avirt_class can become avirt, SND_AVIRTUAL_DRIVER becomes SND_AVIRT_DRIVER Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
-rw-r--r--core.c18
-rw-r--r--core.h2
2 files changed, 10 insertions, 10 deletions
diff --git a/core.c b/core.c
index f31c61a..4645f06 100644
--- a/core.c
+++ b/core.c
@@ -25,7 +25,7 @@ MODULE_LICENSE("GPL v2");
#define D_PRINTK(fmt, args...) DDEBUG(D_LOGNAME, fmt, ##args)
#define D_ERRORK(fmt, args...) DERROR(D_LOGNAME, fmt, ##args)
-#define SND_AVIRTUAL_DRIVER "snd_avirt"
+#define SND_AVIRT_DRIVER "snd_avirt"
static struct snd_avirt_core core = {
.version = { 0, 0, 1 },
@@ -449,13 +449,13 @@ static int __init core_init(void)
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)) {
+ core.class = class_create(THIS_MODULE, SND_AVIRT_DRIVER);
+ if (IS_ERR(core.class)) {
D_ERRORK("No udev support");
- return PTR_ERR(core.avirt_class);
+ return PTR_ERR(core.class);
}
- core.dev = device_create(core.avirt_class, NULL, 0, NULL, "avirtcore");
+ core.dev = device_create(core.class, NULL, 0, NULL, "avirtcore");
if (IS_ERR(core.dev)) {
err = PTR_ERR(core.dev);
goto exit_class;
@@ -490,9 +490,9 @@ static int __init core_init(void)
exit_snd_card:
snd_card_free(core.card);
exit_class_container:
- device_destroy(core.avirt_class, 0);
+ device_destroy(core.class, 0);
exit_class:
- class_destroy(core.avirt_class);
+ class_destroy(core.class);
return err;
}
@@ -506,8 +506,8 @@ static void __exit core_exit(void)
kset_unregister(snd_avirt_audiopath_kset);
snd_card_free(core.card);
- device_destroy(core.avirt_class, 0);
- class_destroy(core.avirt_class);
+ device_destroy(core.class, 0);
+ class_destroy(core.class);
}
module_init(core_init);
diff --git a/core.h b/core.h
index 8804573..61a78e9 100644
--- a/core.h
+++ b/core.h
@@ -20,7 +20,7 @@ struct snd_avirt_core {
int version[3];
struct snd_card *card;
struct device *dev;
- struct class *avirt_class;
+ struct class *class;
struct config_group *stream_group;
unsigned int stream_count;
bool streams_sealed;