linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 7/21] ide-cris: don't override ide_register_hw() result
@ 2007-11-18 22:19 Bartlomiej Zolnierkiewicz
  2007-11-27 12:58 ` Sergei Shtylyov
  0 siblings, 1 reply; 3+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2007-11-18 22:19 UTC (permalink / raw)
  To: linux-ide; +Cc: Mikael Starvik


* Don't override ide_register_hw() result and check if there is a hwif
  available to use.

* MAX_HWIFS is user configurable nowadays so replace it by hard-coded value.

* Remove the comment about ide_hwifs[].

Cc: Mikael Starvik <starvik@axis.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/cris/ide-cris.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

Index: b/drivers/ide/cris/ide-cris.c
===================================================================
--- a/drivers/ide/cris/ide-cris.c
+++ b/drivers/ide/cris/ide-cris.c
@@ -770,15 +770,16 @@ init_e100_ide (void)
 	/* the IDE control register is at ATA address 6, with CS1 active instead of CS0 */
 	ide_offsets[IDE_CONTROL_OFFSET] = cris_ide_reg_addr(6, 1, 0);
 
-	/* first fill in some stuff in the ide_hwifs fields */
+	for (h = 0; h < 4; h++) {
+		ide_hwif_t *hwif = NULL;
 
-	for(h = 0; h < MAX_HWIFS; h++) {
-		ide_hwif_t *hwif = &ide_hwifs[h];
 		ide_setup_ports(&hw, cris_ide_base_address(h),
 		                ide_offsets,
 		                0, 0, cris_ide_ack_intr,
 		                ide_default_irq(0));
 		ide_register_hw(&hw, NULL, 1, &hwif);
+		if (hwif == NULL)
+			continue;
 		hwif->mmio = 1;
 		hwif->chipset = ide_etrax100;
 		hwif->set_pio_mode = &cris_set_pio_mode;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 7/21] ide-cris: don't override ide_register_hw() result
  2007-11-18 22:19 [PATCH 7/21] ide-cris: don't override ide_register_hw() result Bartlomiej Zolnierkiewicz
@ 2007-11-27 12:58 ` Sergei Shtylyov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Shtylyov @ 2007-11-27 12:58 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz; +Cc: linux-ide, Mikael Starvik

Bartlomiej Zolnierkiewicz wrote:

> * Don't override ide_register_hw() result and check if there is a hwif
>   available to use.

> * MAX_HWIFS is user configurable nowadays so replace it by hard-coded value.

> * Remove the comment about ide_hwifs[].

> Cc: Mikael Starvik <starvik@axis.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [PATCH 7/21] ide-cris: don't override ide_register_hw() result
       [not found] <BFECAF9E178F144FAEF2BF4CE739C668055FDB15@exmail1.se.axis.com>
@ 2007-11-27 13:18 ` Mikael Starvik
  0 siblings, 0 replies; 3+ messages in thread
From: Mikael Starvik @ 2007-11-27 13:18 UTC (permalink / raw)
  To: 'Sergei Shtylyov', 'Bartlomiej Zolnierkiewicz'
  Cc: linux-ide, Mikael Starvik

Acked-by: Mikael Starvik <starvik@axis.com>

-----Original Message-----
From: Sergei Shtylyov [mailto:sshtylyov@ru.mvista.com] 
Sent: Tuesday, November 27, 2007 1:58 PM
To: Bartlomiej Zolnierkiewicz
Cc: linux-ide@vger.kernel.org; Mikael Starvik
Subject: Re: [PATCH 7/21] ide-cris: don't override ide_register_hw() result


Bartlomiej Zolnierkiewicz wrote:

> * Don't override ide_register_hw() result and check if there is a hwif
>   available to use.

> * MAX_HWIFS is user configurable nowadays so replace it by hard-coded
value.

> * Remove the comment about ide_hwifs[].

> Cc: Mikael Starvik <starvik@axis.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>

MBR, Sergei


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-11-27 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-18 22:19 [PATCH 7/21] ide-cris: don't override ide_register_hw() result Bartlomiej Zolnierkiewicz
2007-11-27 12:58 ` Sergei Shtylyov
     [not found] <BFECAF9E178F144FAEF2BF4CE739C668055FDB15@exmail1.se.axis.com>
2007-11-27 13:18 ` Mikael Starvik

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).