mm, page_alloc: set alloc_flags only once in slowpath
[linux/fpc-iii.git] / drivers / iio / industrialio-configfs.c
blob45ce2bc47180286c7c3b6ef9f50fb0c72ff7631e
1 /*
2 * Industrial I/O configfs bits
4 * Copyright (c) 2015 Intel Corporation
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms of the GNU General Public License version 2 as published by
8 * the Free Software Foundation.
9 */
11 #include <linux/configfs.h>
12 #include <linux/module.h>
13 #include <linux/init.h>
14 #include <linux/kmod.h>
15 #include <linux/slab.h>
17 #include <linux/iio/iio.h>
18 #include <linux/iio/configfs.h>
20 static struct config_item_type iio_root_group_type = {
21 .ct_owner = THIS_MODULE,
24 struct configfs_subsystem iio_configfs_subsys = {
25 .su_group = {
26 .cg_item = {
27 .ci_namebuf = "iio",
28 .ci_type = &iio_root_group_type,
31 .su_mutex = __MUTEX_INITIALIZER(iio_configfs_subsys.su_mutex),
33 EXPORT_SYMBOL(iio_configfs_subsys);
35 static int __init iio_configfs_init(void)
37 config_group_init(&iio_configfs_subsys.su_group);
39 return configfs_register_subsystem(&iio_configfs_subsys);
41 module_init(iio_configfs_init);
43 static void __exit iio_configfs_exit(void)
45 configfs_unregister_subsystem(&iio_configfs_subsys);
47 module_exit(iio_configfs_exit);
49 MODULE_AUTHOR("Daniel Baluta <daniel.baluta@intel.com>");
50 MODULE_DESCRIPTION("Industrial I/O configfs support");
51 MODULE_LICENSE("GPL v2");