X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fide%2Fide-proc.c;h=975c0ff0f4384a6be7aea27032d896add68b44ca;hb=2b06ac867176d5d24757bda7e13f6255d6b96d7b;hp=fc1d8ae6a80381d08937faf4dc5d2fd687d33c7c;hpb=71ba22fa739029bb158144813b9e82c00326497c;p=linux-2.6-omap-h63xx.git diff --git a/drivers/ide/ide-proc.c b/drivers/ide/ide-proc.c index fc1d8ae6a80..975c0ff0f43 100644 --- a/drivers/ide/ide-proc.c +++ b/drivers/ide/ide-proc.c @@ -1,6 +1,4 @@ /* - * linux/drivers/ide/ide-proc.c Version 1.05 Mar 05, 2003 - * * Copyright (C) 1997-1998 Mark Lord * Copyright (C) 2003 Red Hat * @@ -346,14 +344,20 @@ static int ide_write_setting(ide_drive_t *drive, ide_settings_t *setting, int va static int set_xfer_rate (ide_drive_t *drive, int arg) { + ide_task_t task; int err; if (arg < 0 || arg > 70) return -EINVAL; - err = ide_wait_cmd(drive, - WIN_SETFEATURES, (u8) arg, - SETFEATURES_XFER, 0, NULL); + memset(&task, 0, sizeof(task)); + task.tf.command = WIN_SETFEATURES; + task.tf.feature = SETFEATURES_XFER; + task.tf.nsect = (u8)arg; + task.tf_flags = IDE_TFLAG_OUT_FEATURE | IDE_TFLAG_OUT_NSECT | + IDE_TFLAG_IN_NSECT; + + err = ide_no_data_taskfile(drive, &task); if (!err && arg) { ide_set_xfer_rate(drive, (u8) arg); @@ -735,7 +739,7 @@ void ide_proc_unregister_driver(ide_drive_t *drive, ide_driver_t *driver) EXPORT_SYMBOL(ide_proc_unregister_driver); -static void create_proc_ide_drives(ide_hwif_t *hwif) +void ide_proc_port_register_devices(ide_hwif_t *hwif) { int d; struct proc_dir_entry *ent; @@ -789,9 +793,6 @@ static ide_proc_entry_t hwif_entries[] = { void ide_proc_register_port(ide_hwif_t *hwif) { - if (!hwif->present) - return; - if (!hwif->proc) { hwif->proc = proc_mkdir(hwif->name, proc_ide_root); @@ -800,12 +801,8 @@ void ide_proc_register_port(ide_hwif_t *hwif) ide_add_proc_entries(hwif->proc, hwif_entries, hwif); } - - create_proc_ide_drives(hwif); } -EXPORT_SYMBOL_GPL(ide_proc_register_port); - #ifdef CONFIG_BLK_DEV_IDEPCI void ide_pci_create_host_proc(const char *name, get_info_t *get_info) {