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

staging: most: core: remove class generation

This patch stops the core from generating a module owned class and
registering it with the kernel. It is needed, because there is no need for
a default MOST class to be present in the kernel.
Signed-off-by: default avatarChristian Gromm <christian.gromm@microchip.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c73d915d
...@@ -33,7 +33,6 @@ static struct mostcore { ...@@ -33,7 +33,6 @@ static struct mostcore {
struct device dev; struct device dev;
struct device_driver drv; struct device_driver drv;
struct bus_type bus; struct bus_type bus;
struct class *class;
struct list_head comp_list; struct list_head comp_list;
} mc; } mc;
...@@ -1558,17 +1557,10 @@ static int __init most_init(void) ...@@ -1558,17 +1557,10 @@ static int __init most_init(void)
pr_info("Cannot register most bus\n"); pr_info("Cannot register most bus\n");
return err; return err;
} }
mc.class = class_create(THIS_MODULE, "most");
if (IS_ERR(mc.class)) {
pr_info("No udev support.\n");
err = PTR_ERR(mc.class);
goto exit_bus;
}
err = driver_register(&mc.drv); err = driver_register(&mc.drv);
if (err) { if (err) {
pr_info("Cannot register core driver\n"); pr_info("Cannot register core driver\n");
goto exit_class; goto exit_bus;
} }
mc.dev.init_name = "most_bus"; mc.dev.init_name = "most_bus";
mc.dev.release = release_most_sub; mc.dev.release = release_most_sub;
...@@ -1581,8 +1573,6 @@ static int __init most_init(void) ...@@ -1581,8 +1573,6 @@ static int __init most_init(void)
exit_driver: exit_driver:
driver_unregister(&mc.drv); driver_unregister(&mc.drv);
exit_class:
class_destroy(mc.class);
exit_bus: exit_bus:
bus_unregister(&mc.bus); bus_unregister(&mc.bus);
return err; return err;
...@@ -1593,7 +1583,6 @@ static void __exit most_exit(void) ...@@ -1593,7 +1583,6 @@ static void __exit most_exit(void)
pr_info("exit core module\n"); pr_info("exit core module\n");
device_unregister(&mc.dev); device_unregister(&mc.dev);
driver_unregister(&mc.drv); driver_unregister(&mc.drv);
class_destroy(mc.class);
bus_unregister(&mc.bus); bus_unregister(&mc.bus);
ida_destroy(&mdev_id); ida_destroy(&mdev_id);
} }
......
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