diff --git a/drivers/note/note_driver.c b/drivers/note/note_driver.c index fc079c11fd..66b4f01428 100644 --- a/drivers/note/note_driver.c +++ b/drivers/note/note_driver.c @@ -177,7 +177,10 @@ FAR static struct note_driver_s * static struct note_taskname_s g_note_taskname; #endif +#if defined(CONFIG_SCHED_INSTRUMENTATION_FILTER) || \ + (CONFIG_DRIVERS_NOTE_TASKNAME_BUFSIZE > 0) static spinlock_t g_note_lock; +#endif /**************************************************************************** * Private Functions @@ -1892,7 +1895,7 @@ void sched_note_filter_irq(FAR struct note_filter_irq_s *oldf, * ****************************************************************************/ -# ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP +#ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP void sched_note_filter_tag(FAR struct note_filter_tag_s *oldf, FAR struct note_filter_tag_s *newf) { @@ -1916,7 +1919,7 @@ void sched_note_filter_tag(FAR struct note_filter_tag_s *oldf, spin_unlock_irqrestore_wo_note(&g_note_lock, falgs); } -# endif +#endif #endif /* CONFIG_SCHED_INSTRUMENTATION_FILTER */