]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: most: register net and video config subsystems with configFS
authorChristian Gromm <christian.gromm@microchip.com>
Wed, 12 Jun 2019 09:30:29 +0000 (11:30 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Jun 2019 09:52:39 +0000 (11:52 +0200)
This patch makes the core components net and video register their config
subsystems with configFS. It is needed to have the configuration interface
of the modules exposed to user space.

Signed-off-by: Christian Gromm <christian.gromm@microchip.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/net/net.c
drivers/staging/most/video/video.c

index c8a64e20902736e2c9b78d6cd8132f9308432ece..3fc80ad6730a2f72048717b457b6fc2350bad549 100644 (file)
@@ -507,9 +507,19 @@ static struct core_component comp = {
 
 static int __init most_net_init(void)
 {
+       int err;
+
        spin_lock_init(&list_lock);
        mutex_init(&probe_disc_mt);
-       return most_register_component(&comp);
+       err = most_register_component(&comp);
+       if (err)
+               return err;
+       err = most_register_configfs_subsys(&comp);
+       if (err) {
+               most_deregister_component(&comp);
+               return err;
+       }
+       return 0;
 }
 
 static void __exit most_net_exit(void)
index adca250062e1beb29d8ad48bce0a038b2b58994a..72622eb08bf8a5e719c74ddcf01cdfa1e1929023 100644 (file)
@@ -540,8 +540,18 @@ static struct core_component comp = {
 
 static int __init comp_init(void)
 {
+       int err;
+
        spin_lock_init(&list_lock);
-       return most_register_component(&comp);
+       err = most_register_component(&comp);
+       if (err)
+               return err;
+       err = most_register_configfs_subsys(&comp);
+       if (err) {
+               most_deregister_component(&comp);
+               return err;
+       }
+       return 0;
 }
 
 static void __exit comp_exit(void)