list_del(&intf->link);
mutex_unlock(&ipmi_interfaces_mutex);
- /* At this point no users can be added to the interface. */
+ /*
+ * At this point no users can be added to the interface and no
+ * new messages can be sent.
+ */
+
+ if (intf->handlers->shutdown)
+ intf->handlers->shutdown(intf->send_info);
device_remove_file(intf->si_dev, &intf->nr_msgs_devattr);
device_remove_file(intf->si_dev, &intf->nr_users_devattr);
}
mutex_unlock(&intf->users_mutex);
- if (intf->handlers->shutdown)
- intf->handlers->shutdown(intf->send_info);
-
cleanup_smi_msgs(intf);
ipmi_bmc_unregister(intf);