Exemple #1
0
void ide_proc_register_driver(ide_drive_t *drive, struct ide_driver *driver)
{
    mutex_lock(&ide_setting_mtx);
    drive->settings = driver->proc_devsets(drive);
    mutex_unlock(&ide_setting_mtx);

    ide_add_proc_entries(drive->proc, driver->proc_entries(drive), drive);
}
Exemple #2
0
void ide_proc_register_port(ide_hwif_t *hwif)
{
    if (!hwif->proc) {
        hwif->proc = proc_mkdir(hwif->name, proc_ide_root);

        if (!hwif->proc)
            return;

        ide_add_proc_entries(hwif->proc, hwif_entries, hwif);
    }
}
void create_proc_ide_interfaces(void)
{
	int	h;

	for (h = 0; h < MAX_HWIFS; h++) {
		ide_hwif_t *hwif = &ide_hwifs[h];

		if (!hwif->present)
			continue;
		if (!hwif->proc) {
			hwif->proc = proc_mkdir(hwif->name, proc_ide_root);
			if (!hwif->proc)
				return;
			ide_add_proc_entries(hwif->proc, hwif_entries, hwif);
		}
		create_proc_ide_drives(hwif);
	}
}
Exemple #4
0
void ide_proc_port_register_devices(ide_hwif_t *hwif)
{
    struct proc_dir_entry *ent;
    struct proc_dir_entry *parent = hwif->proc;
    ide_drive_t *drive;
    char name[64];
    int i;

    ide_port_for_each_dev(i, drive, hwif) {
        if ((drive->dev_flags & IDE_DFLAG_PRESENT) == 0 || drive->proc)
            continue;

        drive->proc = proc_mkdir(drive->name, parent);
        if (drive->proc)
            ide_add_proc_entries(drive->proc, generic_drive_entries, drive);
        sprintf(name, "ide%d/%s", (drive->name[2]-'a')/2, drive->name);
        ent = proc_symlink(drive->name, proc_ide_root, name);
        if (!ent) return;
    }
}
Exemple #5
0
void ide_proc_port_register_devices(ide_hwif_t *hwif)
{
    int    d;
    struct proc_dir_entry *ent;
    struct proc_dir_entry *parent = hwif->proc;
    char name[64];

    for (d = 0; d < MAX_DRIVES; d++) {
        ide_drive_t *drive = &hwif->drives[d];

        if (!drive->present)
            continue;
        if (drive->proc)
            continue;

        drive->proc = proc_mkdir(drive->name, parent);
        if (drive->proc)
            ide_add_proc_entries(drive->proc, generic_drive_entries, drive);
        sprintf(name, "ide%d/%s", (drive->name[2]-'a')/2, drive->name);
        ent = proc_symlink(drive->name, proc_ide_root, name);
        if (!ent) return;
    }
}
Exemple #6
0
void ide_proc_register_driver(ide_drive_t *drive, ide_driver_t *driver)
{
    ide_add_proc_entries(drive->proc, driver->proc, drive);
}