void ide_proc_unregister_port(ide_hwif_t *hwif) { if (hwif->proc) { ide_remove_proc_entries(hwif->proc, hwif_entries); remove_proc_entry(hwif->name, proc_ide_root); hwif->proc = NULL; } }
void ide_proc_unregister_device(ide_drive_t *drive) { if (drive->proc) { ide_remove_proc_entries(drive->proc, generic_drive_entries); remove_proc_entry(drive->name, proc_ide_root); remove_proc_entry(drive->name, drive->hwif->proc); drive->proc = NULL; } }
void destroy_proc_ide_interface(ide_hwif_t *hwif) { if (hwif->proc) { destroy_proc_ide_drives(hwif); ide_remove_proc_entries(hwif->proc, hwif_entries); remove_proc_entry(hwif->name, proc_ide_root); hwif->proc = NULL; } }
static void destroy_proc_ide_device(ide_hwif_t *hwif, ide_drive_t *drive) { if (drive->proc) { ide_remove_proc_entries(drive->proc, generic_drive_entries); remove_proc_entry(drive->name, proc_ide_root); remove_proc_entry(drive->name, hwif->proc); drive->proc = NULL; } }
void ide_proc_unregister_driver(ide_drive_t *drive, struct ide_driver *driver) { ide_remove_proc_entries(drive->proc, driver->proc_entries(drive)); mutex_lock(&ide_setting_mtx); /* * ide_setting_mtx protects both the settings list and the use * of settings (we cannot take a setting out that is being used). */ drive->settings = NULL; mutex_unlock(&ide_setting_mtx); }
void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) { unsigned long flags; ide_remove_proc_entries(drive->proc, driver->proc); mutex_lock(&ide_setting_mtx); spin_lock_irqsave(&ide_lock, flags); /* * ide_setting_mtx protects the settings list * ide_lock protects the use of settings * * so we need to hold both, ide_settings_sem because we want to * modify the settings list, and ide_lock because we cannot take * a setting out that is being used. * * OTOH both ide_{read,write}_setting are only ever used under * ide_setting_mtx. */ auto_remove_settings(drive); spin_unlock_irqrestore(&ide_lock, flags); mutex_unlock(&ide_setting_mtx); }