diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2016-07-11 13:50:01 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-24 10:09:29 +0200 |
commit | 8f0c75b1d68fcd578932378c94ccb82a9f9fa767 (patch) | |
tree | 360293f4df0dd74194acf8b7031fbbbce274c292 /include | |
parent | 007f0acf06f4d1853afe45c933cc09e7ca967cda (diff) | |
download | lwn-8f0c75b1d68fcd578932378c94ccb82a9f9fa767.tar.gz lwn-8f0c75b1d68fcd578932378c94ccb82a9f9fa767.zip |
iio: sw-trigger: Fix config group initialization
commit b2f0c09664b72b2f8c581383a9337ac3092e42c8 upstream.
Use the IS_ENABLED() helper macro to ensure that the configfs group is
initialized either when configfs is built-in or when configfs is built as a
module. Otherwise software trigger creation will result in undefined
behaviour when configfs is built as a mdoule since the configfs group for
the trigger is not properly initialized.
Fixes: b662f809d410 ("iio: core: Introduce IIO software triggers")
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Daniel Baluta <daniel.baluta@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/iio/sw_trigger.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/iio/sw_trigger.h b/include/linux/iio/sw_trigger.h index 5198f8ed08a4..c97eab67558f 100644 --- a/include/linux/iio/sw_trigger.h +++ b/include/linux/iio/sw_trigger.h @@ -62,7 +62,7 @@ void iio_swt_group_init_type_name(struct iio_sw_trigger *t, const char *name, struct config_item_type *type) { -#ifdef CONFIG_CONFIGFS_FS +#if IS_ENABLED(CONFIG_CONFIGFS_FS) config_group_init_type_name(&t->group, name, type); #endif } |