LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
To: linux-ide@vger.kernel.org
Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 04/12] cmd640: cleanup setup_device_ptrs()
Date: Sat, 16 Feb 2008 17:39:18 +0100	[thread overview]
Message-ID: <20080216163918.10174.58524.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080216163856.10174.72546.sendpatchset@localhost.localdomain>

This loop is no longer needed.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/pci/cmd640.c |   14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

Index: b/drivers/ide/pci/cmd640.c
===================================================================
--- a/drivers/ide/pci/cmd640.c
+++ b/drivers/ide/pci/cmd640.c
@@ -409,19 +409,9 @@ static void __init check_prefetch (unsig
  */
 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];

  parent reply	other threads:[~2008-02-16 16:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-16 16:38 [PATCH 01/12] ide: remove ide_default_io_ctl() macro Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 02/12] ide: remove ppc ifdef from init_ide_data() Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 03/12] ide: add ide-4drives host driver Bartlomiej Zolnierkiewicz
2008-02-16 17:26   ` Randy Dunlap
2008-02-17 17:12     ` Bartlomiej Zolnierkiewicz
2008-02-19 13:03   ` Sergei Shtylyov
2008-02-19 21:24     ` Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` Bartlomiej Zolnierkiewicz [this message]
2008-02-16 16:39 ` [PATCH 05/12] cmd640: init hwif->{io_ports,irq} explicitly Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 06/12] ide: limit legacy VLB host drivers to alpha, x86 and mips Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 07/12] ide: init hwif->{io_ports,irq} explicitly in legacy VLB host drivers Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 08/12] ide: remove needless hwif->irq check from ide_hwif_configure() Bartlomiej Zolnierkiewicz
2008-02-16 16:39 ` [PATCH 09/12] ide: move default IDE ports setup to ide_generic host driver Bartlomiej Zolnierkiewicz
2008-02-16 16:40 ` [PATCH 10/12] ide: remove ide_init_default_irq() macro Bartlomiej Zolnierkiewicz
2008-02-16 16:40 ` [PATCH 11/12] ide: cleanup ide_match_hwif() Bartlomiej Zolnierkiewicz
2008-02-16 16:40 ` [PATCH 12/12] ide: cleanup ide_find_port() Bartlomiej Zolnierkiewicz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080216163918.10174.58524.sendpatchset@localhost.localdomain \
    --to=bzolnier@gmail.com \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH 04/12] cmd640: cleanup setup_device_ptrs()' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).