aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/iio/timer/stm32-timer-trigger.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/iio/timer/stm32-timer-trigger.h')
-rw-r--r--include/linux/iio/timer/stm32-timer-trigger.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/linux/iio/timer/stm32-timer-trigger.h b/include/linux/iio/timer/stm32-timer-trigger.h
index d68add80ab86..37572e4dc73a 100644
--- a/include/linux/iio/timer/stm32-timer-trigger.h
+++ b/include/linux/iio/timer/stm32-timer-trigger.h
@@ -1,9 +1,8 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (C) STMicroelectronics 2016
*
* Author: Benjamin Gaignard <benjamin.gaignard@st.com>
- *
- * License terms: GNU General Public License (GPL), version 2
*/
#ifndef _STM32_TIMER_TRIGGER_H_
@@ -73,6 +72,15 @@
#define TIM17_OC1 "tim17_oc1"
+#if IS_REACHABLE(CONFIG_IIO_STM32_TIMER_TRIGGER)
bool is_stm32_timer_trigger(struct iio_trigger *trig);
-
+#else
+static inline bool is_stm32_timer_trigger(struct iio_trigger *trig)
+{
+#if IS_ENABLED(CONFIG_IIO_STM32_TIMER_TRIGGER)
+ pr_warn_once("stm32-timer-trigger not linked in\n");
+#endif
+ return false;
+}
+#endif
#endif