ec_state_t GetECState(void) { return ec_info.ec_state; };
-void ResetECInfo(void) {
- unsigned long spinlock_flags = 0L;
-
- spin_lock_irqsave (&ec_spinlock, spinlock_flags);
+void reset_ec_info_nolock(void)
+{
ec_info.trace_size = 0;
ec_info.first = 0;
ec_info.after_last = 0;
ec_info.m_nEndSubbufNum = 0;
ec_info.m_nEndOffset = 0;
ec_info.m_nSubbufSavedEvents = 0;
+}
+
+void ResetECInfo(void) {
+ unsigned long spinlock_flags = 0L;
+
+ spin_lock_irqsave (&ec_spinlock, spinlock_flags);
+ reset_ec_info_nolock();
spin_unlock_irqrestore (&ec_spinlock, spinlock_flags);
}
spin_lock_irqsave (&ec_spinlock, spinlock_flags);
ec_info.m_nMode = nECMode;
+ reset_ec_info_nolock();
spin_unlock_irqrestore (&ec_spinlock, spinlock_flags);
return 0;
extern int copy_ec_probe_info_to_user_space (ec_probe_info_t * p_user_ec_probe_info);
extern ec_state_t GetECState(void);
+extern void reset_ec_info_nolock(void);
extern void ResetECInfo(void);
extern void CleanECInfo(void);
extern int IsECMode(unsigned long nMask);