iio:configfs: Introduce iio/configfs.h to provide a location for the configfs_subsystem
authorJonathan Cameron <jic23@kernel.org>
Sat, 5 Dec 2015 16:23:26 +0000 (16:23 +0000)
committerJonathan Cameron <jic23@kernel.org>
Sat, 5 Dec 2015 16:25:30 +0000 (16:25 +0000)
This exported element needs to be accesible to all drivers using configfs
within IIO.  Previously it was in the sw_trig.h file which only convered one
such usecase.  This also fixes a sparse warning as it is now in a header
that makes sense to include from industrialio-configfs.c

Signed-off-by: Jonathan Cameron < jic23@kernel.org>
drivers/iio/industrialio-configfs.c
drivers/iio/industrialio-sw-trigger.c
include/linux/iio/configfs.h [new file with mode: 0644]
include/linux/iio/sw_trigger.h

index 83563dd7fcf4bcb681a048628a80d5f8b41d93a1..45ce2bc47180286c7c3b6ef9f50fb0c72ff7631e 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 
 #include <linux/iio/iio.h>
+#include <linux/iio/configfs.h>
 
 static struct config_item_type iio_root_group_type = {
        .ct_owner       = THIS_MODULE,
index 4825cfd9c4ea4ae07695bb16c914f37f95f7c98c..311f9fe5aa34bd809b2705e50c84682f460e35f1 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 
 #include <linux/iio/sw_trigger.h>
+#include <linux/iio/configfs.h>
 #include <linux/configfs.h>
 
 static struct config_group *iio_triggers_group;
diff --git a/include/linux/iio/configfs.h b/include/linux/iio/configfs.h
new file mode 100644 (file)
index 0000000..93befd6
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * Industrial I/O configfs support
+ *
+ * Copyright (c) 2015 Intel Corporation
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published by
+ * the Free Software Foundation.
+ */
+#ifndef __IIO_CONFIGFS
+#define __IIO_CONFIGFS
+
+extern struct configfs_subsystem iio_configfs_subsys;
+
+#endif /* __IIO_CONFIGFS */
index c2f33b2b35a5e1e02592ad6c26d4b1b04be1f6dd..5198f8ed08a464f8da3294efe814f79e2978a009 100644 (file)
@@ -20,7 +20,6 @@
        module_driver(__iio_sw_trigger_type, iio_register_sw_trigger_type, \
                      iio_unregister_sw_trigger_type)
 
-extern struct configfs_subsystem iio_configfs_subsys;
 struct iio_sw_trigger_ops;
 
 struct iio_sw_trigger_type {