hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/include/linux/iio/timer/stm32-timer-trigger.h
....@@ -1,9 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * Copyright (C) STMicroelectronics 2016
34 *
45 * Author: Benjamin Gaignard <benjamin.gaignard@st.com>
5
- *
6
- * License terms: GNU General Public License (GPL), version 2
76 */
87
98 #ifndef _STM32_TIMER_TRIGGER_H_
....@@ -73,6 +72,15 @@
7372
7473 #define TIM17_OC1 "tim17_oc1"
7574
75
+#if IS_REACHABLE(CONFIG_IIO_STM32_TIMER_TRIGGER)
7676 bool is_stm32_timer_trigger(struct iio_trigger *trig);
77
-
77
+#else
78
+static inline bool is_stm32_timer_trigger(struct iio_trigger *trig)
79
+{
80
+#if IS_ENABLED(CONFIG_IIO_STM32_TIMER_TRIGGER)
81
+ pr_warn_once("stm32-timer-trigger not linked in\n");
82
+#endif
83
+ return false;
84
+}
85
+#endif
7886 #endif