Commit 99d75346 authored by Christian Gromm's avatar Christian Gromm Committed by Greg Kroah-Hartman

staging: most: core: rename device struct of core module

This patch gives the struct device variable of the core a more meaningful
name.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarAndrey Shvetsov <andrey.shvetsov@k2l.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5a63e23a
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define STRING_SIZE 80 #define STRING_SIZE 80
static struct class *most_class; static struct class *most_class;
static struct device *class_glue_dir; static struct device *core_dev;
static struct ida mdev_id; static struct ida mdev_id;
static int dummy_num_buffers; static int dummy_num_buffers;
...@@ -1877,22 +1877,19 @@ static int __init most_init(void) ...@@ -1877,22 +1877,19 @@ static int __init most_init(void)
goto exit_class; goto exit_class;
} }
class_glue_dir = core_dev = device_create(most_class, NULL, 0, NULL, "mostcore");
device_create(most_class, NULL, 0, NULL, "mostcore"); if (IS_ERR(core_dev)) {
if (IS_ERR(class_glue_dir)) { err = PTR_ERR(core_dev);
err = PTR_ERR(class_glue_dir);
goto exit_driver; goto exit_driver;
} }
most_aim_kset = most_aim_kset = kset_create_and_add("aims", NULL, &core_dev->kobj);
kset_create_and_add("aims", NULL, &class_glue_dir->kobj);
if (!most_aim_kset) { if (!most_aim_kset) {
err = -ENOMEM; err = -ENOMEM;
goto exit_class_container; goto exit_class_container;
} }
most_inst_kset = most_inst_kset = kset_create_and_add("devices", NULL, &core_dev->kobj);
kset_create_and_add("devices", NULL, &class_glue_dir->kobj);
if (!most_inst_kset) { if (!most_inst_kset) {
err = -ENOMEM; err = -ENOMEM;
goto exit_driver_kset; goto exit_driver_kset;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment