Re: [PATCH] iio: sw-trigger: Fix config group initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 11, 2016 at 2:55 PM, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> 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@xxxxxxxxxx>

Acked-by: Daniel Baluta <daniel.baluta@xxxxxxxxx>

> ---
> Appologies if you received this twice, forgot the list on the first try.
> ---
>  include/linux/iio/sw_trigger.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/iio/sw_trigger.h b/include/linux/iio/sw_trigger.h
> index 5198f8e..c97eab6 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
>  }
> --
--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux