[PATCH 25/28] staging: most: core: remove class generation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch stops the core from generating a module owned class
and registering it with the kernel.

Signed-off-by: Christian Gromm <christian.gromm@xxxxxxxxxxxxx>
---
 drivers/staging/most/core.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c
index c061e67..6ec56930 100644
--- a/drivers/staging/most/core.c
+++ b/drivers/staging/most/core.c
@@ -39,7 +39,6 @@
 	struct device dev;
 	struct device_driver drv;
 	struct bus_type bus;
-	struct class *class;
 	struct list_head comp_list;
 } mc;
 
@@ -1562,17 +1561,10 @@ static int __init most_init(void)
 		pr_info("Cannot register most bus\n");
 		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);
 	if (err) {
 		pr_info("Cannot register core driver\n");
-		goto exit_class;
+		goto exit_bus;
 	}
 	mc.dev.init_name = "most";
 	mc.dev.release = release_most_sub;
@@ -1584,8 +1576,6 @@ static int __init most_init(void)
 
 exit_driver:
 	driver_unregister(&mc.drv);
-exit_class:
-	class_destroy(mc.class);
 exit_bus:
 	bus_unregister(&mc.bus);
 	return err;
@@ -1596,7 +1586,6 @@ static void __exit most_exit(void)
 	pr_info("exit core module\n");
 	device_unregister(&mc.dev);
 	driver_unregister(&mc.drv);
-	class_destroy(mc.class);
 	bus_unregister(&mc.bus);
 	ida_destroy(&mdev_id);
 }
-- 
1.9.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux