Skip to contentSkip to conversation

iio:configfs: Introduce iio/configfs.h to provide a location for the configfs_subsystem

PATCH In review Jonathan Cameron 2 participants 3 messages Dec 5, 2015 – Dec 12, 2015 IIO

lore
Share & tools
lore

Jonathan Cameron

author maintainer
#0 lore raw

PATCH 1/1 iio:configfs: Introduce iio/configfs.h to provide a location for the configfs_subsystem

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

---
 drivers/iio/industrialio-configfs.c   |  1 +
 drivers/iio/industrialio-sw-trigger.c |  1 +
 include/linux/iio/configfs.h          | 15 +++++++++++++++
 include/linux/iio/sw_trigger.h        |  1 -
 4 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 include/linux/iio/configfs.h
drivers/iio/industrialio-configfs.c +1 -0
index 83563dd7fcf4..45ce2bc47180 100644
@@ -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,
drivers/iio/industrialio-sw-trigger.c +1 -0
index 4825cfd9c4ea..311f9fe5aa34 100644
@@ -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;
include/linux/iio/configfs.h new file +15 -0
new file mode 100644
index 000000000000..93befd67c15c
@@ -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 */
include/linux/iio/sw_trigger.h +0 -1
index c2f33b2b35a5..5198f8ed08a4 100644
@@ -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 {
Signature · 1 line
2.6.3
author maintainer
#1 lore raw
Quoted 6 lines · Jonathan Cameron

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

I guess no one cares or they are all happy with this :) Applied.

J

Quoted 66 lines
---
 drivers/iio/industrialio-configfs.c   |  1 +
 drivers/iio/industrialio-sw-trigger.c |  1 +
 include/linux/iio/configfs.h          | 15 +++++++++++++++
 include/linux/iio/sw_trigger.h        |  1 -
 4 files changed, 17 insertions(+), 1 deletion(-)
 create mode 100644 include/linux/iio/configfs.h
drivers/iio/industrialio-configfs.c +1 -0
index 83563dd7fcf4..45ce2bc47180 100644
@@ -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,
drivers/iio/industrialio-sw-trigger.c +1 -0
index 4825cfd9c4ea..311f9fe5aa34 100644
@@ -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;
include/linux/iio/configfs.h new file +15 -0
new file mode 100644
index 000000000000..93befd67c15c
@@ -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 */
include/linux/iio/sw_trigger.h +0 -1
index c2f33b2b35a5..5198f8ed08a4 100644
@@ -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 {
#2 lore raw
Quoted 9 lines · Jonathan Cameron
Quoted 6 lines · Jonathan Cameron

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

I guess no one cares or they are all happy with this :) Applied.

:)), I thought I already added my Acked-by on this. I have must been dreaming.