Lines Matching defs:to_clean
321 static void cleanup_one_si(struct smi_info *to_clean);
3449 static void cleanup_one_si(struct smi_info *to_clean)
3454 if (!to_clean)
3457 list_del(&to_clean->link);
3460 atomic_inc(&to_clean->stop_operation);
3466 wait_for_timer_and_thread(to_clean);
3473 spin_lock_irqsave(&to_clean->si_lock, flags);
3474 while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) {
3475 spin_unlock_irqrestore(&to_clean->si_lock, flags);
3476 poll(to_clean);
3478 spin_lock_irqsave(&to_clean->si_lock, flags);
3480 disable_si_irq(to_clean);
3481 spin_unlock_irqrestore(&to_clean->si_lock, flags);
3482 while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) {
3483 poll(to_clean);
3488 if (to_clean->irq_cleanup)
3489 to_clean->irq_cleanup(to_clean);
3490 while (to_clean->curr_msg || (to_clean->si_state != SI_NORMAL)) {
3491 poll(to_clean);
3495 if (to_clean->intf)
3496 rv = ipmi_unregister_smi(to_clean->intf);
3503 if (to_clean->handlers)
3504 to_clean->handlers->cleanup(to_clean->si_sm);
3506 kfree(to_clean->si_sm);
3508 if (to_clean->addr_source_cleanup)
3509 to_clean->addr_source_cleanup(to_clean);
3510 if (to_clean->io_cleanup)
3511 to_clean->io_cleanup(to_clean);
3513 if (to_clean->dev_registered)
3514 platform_device_unregister(to_clean->pdev);
3516 kfree(to_clean);