-
-#if 0
- /* While there are still virtual hosts, unregister them
- * Note that it's important to do this completely before removing
- * the structures because of possible races with the /proc
- * interface
- */
- for (next = us_list; next; next = next->next) {
- US_DEBUGP("-- calling scsi_unregister_host()\n");
- scsi_unregister_host(&usb_stor_host_template);
- }
-
- /* While there are still structures, free them. Note that we are
- * now race-free, since these structures can no longer be accessed
- * from either the SCSI command layer or the /proc interface
- */
- while (us_list) {
- /* keep track of where the next one is */
- next = us_list->next;
-
- /* If there's extra data in the us_data structure then
- * free that first */
- if (us_list->extra) {
- /* call the destructor routine, if it exists */
- if (us_list->extra_destructor) {
- US_DEBUGP("-- calling extra_destructor()\n");
- us_list->extra_destructor(us_list->extra);
- }
-
- /* destroy the extra data */
- US_DEBUGP("-- freeing the data structure\n");
- kfree(us_list->extra);
- }
-
- /* free the structure itself */
- kfree (us_list);
-
- /* advance the list pointer */
- us_list = next;
- }
-#endif