Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6
[cascardo/linux.git] / net / core / netprio_cgroup.c
index 09eda68..5b8aa2f 100644 (file)
 #include <net/sock.h>
 #include <net/netprio_cgroup.h>
 
-static struct cgroup_subsys_state *cgrp_create(struct cgroup *cgrp);
-static void cgrp_destroy(struct cgroup *cgrp);
-static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp);
-
-struct cgroup_subsys net_prio_subsys = {
-       .name           = "net_prio",
-       .create         = cgrp_create,
-       .destroy        = cgrp_destroy,
-       .populate       = cgrp_populate,
-#ifdef CONFIG_NETPRIO_CGROUP
-       .subsys_id      = net_prio_subsys_id,
-#endif
-       .module         = THIS_MODULE
-};
-
 #define PRIOIDX_SZ 128
 
 static unsigned long prioidx_map[PRIOIDX_SZ];
@@ -259,12 +244,19 @@ static struct cftype ss_files[] = {
                .read_map = read_priomap,
                .write_string = write_priomap,
        },
+       { }     /* terminate */
 };
 
-static int cgrp_populate(struct cgroup_subsys *ss, struct cgroup *cgrp)
-{
-       return cgroup_add_files(cgrp, ss, ss_files, ARRAY_SIZE(ss_files));
-}
+struct cgroup_subsys net_prio_subsys = {
+       .name           = "net_prio",
+       .create         = cgrp_create,
+       .destroy        = cgrp_destroy,
+#ifdef CONFIG_NETPRIO_CGROUP
+       .subsys_id      = net_prio_subsys_id,
+#endif
+       .base_cftypes   = ss_files,
+       .module         = THIS_MODULE
+};
 
 static int netprio_device_event(struct notifier_block *unused,
                                unsigned long event, void *ptr)