]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
cmd640: cleanup setup_device_ptrs()
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 17 Apr 2008 22:46:34 +0000 (00:46 +0200)
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Thu, 17 Apr 2008 22:46:34 +0000 (00:46 +0200)
This loop is no longer needed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
drivers/ide/pci/cmd640.c

index 58a95f62e383f095192ef211c1cfc89e9e5411cb..6b8e4061d3c42de1b5aa3d14bf87e24138d9185e 100644 (file)
@@ -409,19 +409,9 @@ static void __init check_prefetch (unsigned int index)
  */
 static void __init setup_device_ptrs (void)
 {
-       unsigned int i;
+       cmd_hwif0 = &ide_hwifs[0];
+       cmd_hwif1 = &ide_hwifs[1];
 
-       cmd_hwif0 = &ide_hwifs[0]; /* default, if not found below */
-       cmd_hwif1 = &ide_hwifs[1]; /* default, if not found below */
-       for (i = 0; i < MAX_HWIFS; i++) {
-               ide_hwif_t *hwif = &ide_hwifs[i];
-               if (hwif->chipset == ide_unknown) {
-                       if (hwif->io_ports[IDE_DATA_OFFSET] == 0x1f0)
-                               cmd_hwif0 = hwif;
-                       else if (hwif->io_ports[IDE_DATA_OFFSET] == 0x170)
-                               cmd_hwif1 = hwif;
-               }
-       }
        cmd_drives[0] = &cmd_hwif0->drives[0];
        cmd_drives[1] = &cmd_hwif0->drives[1];
        cmd_drives[2] = &cmd_hwif1->drives[0];