Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

void scc_stop_monitoring_security_failure ( void   callback_funcvoid  ) 

This routine will deregister a function previously registered with scc_monitor_security_failure().

Parameters:
callback_func Function pointer to routine previously registered with scc_stop_monitoring_security_failure().

Definition at line 850 of file scc2_driver.c.

References os_lock_save_context, os_unlock_restore_context, scc_availability, SCC_CALLBACK_SIZE, scc_callbacks, scc_callbacks_lock, scc_init(), and SCC_STATUS_INITIAL.

{
      os_lock_context_t irq_flags;  /* for IRQ save/restore */
      int i;

      if (scc_availability == SCC_STATUS_INITIAL) {
            scc_init();
      }

      /* Acquire lock of callbacks table.  Could be spin_lock_irq() if this
       * routine were just called from base (not interrupt) level
       */
      os_lock_save_context(scc_callbacks_lock, irq_flags);

      /* Search every entry of the table for this function */
      for (i = 0; i < SCC_CALLBACK_SIZE; i++) {
            if (scc_callbacks[i] == callback_func) {
                  scc_callbacks[i] = NULL;      /* found instance - clear it out */
                  break;
            }
      }

      /* Free the lock */
      os_unlock_restore_context(scc_callbacks_lock, irq_flags);

      return;
}                       /* scc_stop_monitoring_security_failure */


Generated by  Doxygen 1.6.0   Back to index