Skip to content

Commit 8d6c16d

Browse files
committed
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 Signed-off-by: Jonathan Cameron < [email protected]>
1 parent 93e87d7 commit 8d6c16d

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

drivers/iio/industrialio-configfs.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/slab.h>
1616

1717
#include <linux/iio/iio.h>
18+
#include <linux/iio/configfs.h>
1819

1920
static struct config_item_type iio_root_group_type = {
2021
.ct_owner = THIS_MODULE,

drivers/iio/industrialio-sw-trigger.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <linux/slab.h>
1616

1717
#include <linux/iio/sw_trigger.h>
18+
#include <linux/iio/configfs.h>
1819
#include <linux/configfs.h>
1920

2021
static struct config_group *iio_triggers_group;

include/linux/iio/configfs.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Industrial I/O configfs support
3+
*
4+
* Copyright (c) 2015 Intel Corporation
5+
*
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+
*/
10+
#ifndef __IIO_CONFIGFS
11+
#define __IIO_CONFIGFS
12+
13+
extern struct configfs_subsystem iio_configfs_subsys;
14+
15+
#endif /* __IIO_CONFIGFS */

include/linux/iio/sw_trigger.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
module_driver(__iio_sw_trigger_type, iio_register_sw_trigger_type, \
2121
iio_unregister_sw_trigger_type)
2222

23-
extern struct configfs_subsystem iio_configfs_subsys;
2423
struct iio_sw_trigger_ops;
2524

2625
struct iio_sw_trigger_type {

0 commit comments

Comments
 (0)